Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
2dot5
ClickHouse
提交
3242b9b4
C
ClickHouse
项目概览
2dot5
/
ClickHouse
通知
3
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
C
ClickHouse
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
未验证
提交
3242b9b4
编写于
11月 03, 2020
作者:
A
alexey-milovidov
提交者:
GitHub
11月 03, 2020
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #16598 from ClickHouse/test-5995
Add a test for #5995
上级
7978ae63
3f21ae55
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
148 addition
and
0 deletion
+148
-0
tests/queries/0_stateless/01548_lzy305.reference
tests/queries/0_stateless/01548_lzy305.reference
+0
-0
tests/queries/0_stateless/01548_lzy305.sql
tests/queries/0_stateless/01548_lzy305.sql
+148
-0
未找到文件。
tests/queries/0_stateless/01548_lzy305.reference
0 → 100644
浏览文件 @
3242b9b4
tests/queries/0_stateless/01548_lzy305.sql
0 → 100644
浏览文件 @
3242b9b4
DROP
TABLE
IF
EXISTS
fct_rt_dc_shop_sku_vender_day
;
create
table
fct_rt_dc_shop_sku_vender_day
(
stat_year
UInt16
,
stat_month
UInt32
,
stat_day
Date
,
out_buid
UInt8
,
out_shop_id
String
,
in_shop_id
LowCardinality
(
String
),
datasource
UInt8
,
venderid
String
,
categorytreeid
UInt8
,
categoryid
String
,
goodsid
LowCardinality
(
String
),
logistics
UInt8
,
buntype
UInt8
,
dctype
UInt8
,
shopformid
UInt8
,
rt_qty
Decimal
(
18
,
4
),
rt_cost
Decimal
(
18
,
4
),
rt_taxcost
Decimal
(
18
,
4
),
rt_boxes
Decimal
(
18
,
4
),
rt_shops
Nullable
(
String
),
rt_drygood_qty
Decimal
(
18
,
4
),
rt_drygood_cost
Decimal
(
18
,
4
),
rt_drygood_boxes
Decimal
(
18
,
4
),
rt_drygood_shops
LowCardinality
(
Nullable
(
String
)),
rt_fresh_qty
Decimal
(
18
,
4
),
rt_fresh_cost
Decimal
(
18
,
4
),
rt_fresh_shops
LowCardinality
(
Nullable
(
String
)),
rt_supshop_cost
Decimal
(
18
,
4
),
rt_supshop_qty
Decimal
(
18
,
4
),
rt_supshop_boxes
Decimal
(
18
,
4
),
rt_supshop_shops
LowCardinality
(
Nullable
(
String
)),
rt_smallshop_cost
Decimal
(
18
,
4
),
rt_smallshop_qty
Decimal
(
18
,
4
),
rt_smallshop_boxes
Decimal
(
18
,
4
),
rt_smallshop_shops
LowCardinality
(
Nullable
(
String
)),
rt_dc_cost
Decimal
(
18
,
4
),
rt_dc_qty
Decimal
(
18
,
4
),
rt_dc_boxes
Decimal
(
18
,
4
),
rt_dc_shops
LowCardinality
(
Nullable
(
String
)),
rt_drygood_supshop_cost
Decimal
(
18
,
4
),
rt_drygood_supshop_qty
Decimal
(
18
,
4
),
rt_drygood_supshop_boxes
Decimal
(
18
,
4
),
rt_drygood_supshop_shops
LowCardinality
(
Nullable
(
String
)),
rt_drygood_smallshop_cost
Decimal
(
18
,
4
),
rt_drygood_smallshop_qty
Decimal
(
18
,
4
),
rt_drygood_smallshop_boxes
Decimal
(
18
,
4
),
rt_drygood_smallshop_shops
LowCardinality
(
Nullable
(
String
)),
rt_drygood_dc_cost
Decimal
(
18
,
4
),
rt_drygood_dc_qty
Decimal
(
18
,
4
),
rt_drygood_dc_boxes
Decimal
(
18
,
4
),
rt_drygood_dc_shops
LowCardinality
(
Nullable
(
String
)),
rt_fresh_supshop_cost
Decimal
(
18
,
4
),
rt_fresh_supshop_qty
Decimal
(
18
,
4
),
rt_fresh_supshop_shops
LowCardinality
(
Nullable
(
String
)),
rt_fresh_smallshop_cost
Decimal
(
18
,
4
),
rt_fresh_smallshop_qty
Decimal
(
18
,
4
),
rt_fresh_smallshop_shops
LowCardinality
(
Nullable
(
String
)),
rt_fresh_dc_cost
Decimal
(
18
,
4
),
rt_fresh_dc_qty
Decimal
(
18
,
4
),
rt_fresh_dc_shops
LowCardinality
(
Nullable
(
String
)),
stat_day_num
String
default
formatDateTime
(
stat_day
,
'%F'
)
)
engine
=
MergeTree
PARTITION
BY
toYYYYMM
(
stat_day
)
ORDER
BY
(
stat_day
,
out_shop_id
)
SETTINGS
index_granularity
=
8192
;
select
stat_year
,
stat_month
,
out_buid
,
out_shop_id
,
in_shop_id
,
datasource
,
venderid
,
categorytreeid
,
categoryid
,
goodsid
,
logistics
,
buntype
,
dctype
,
shopformid
,
sum
(
rt_qty
),
sum
(
rt_cost
),
sum
(
rt_taxcost
),
sum
(
rt_boxes
),
max
(
rt_shops
),
sum
(
rt_drygood_qty
),
sum
(
rt_drygood_cost
),
sum
(
rt_drygood_boxes
),
max
(
rt_drygood_shops
),
sum
(
rt_fresh_qty
),
sum
(
rt_fresh_cost
),
max
(
rt_fresh_shops
),
sum
(
rt_supshop_cost
),
sum
(
rt_supshop_qty
),
sum
(
rt_supshop_boxes
),
max
(
rt_supshop_shops
),
sum
(
rt_smallshop_cost
),
sum
(
rt_smallshop_qty
),
sum
(
rt_smallshop_boxes
),
max
(
rt_smallshop_shops
),
sum
(
rt_dc_cost
),
sum
(
rt_dc_qty
),
sum
(
rt_dc_boxes
),
max
(
rt_dc_shops
),
sum
(
rt_drygood_supshop_cost
),
sum
(
rt_drygood_supshop_qty
),
sum
(
rt_drygood_supshop_boxes
),
max
(
rt_drygood_supshop_shops
),
sum
(
rt_drygood_smallshop_cost
),
sum
(
rt_drygood_smallshop_qty
),
sum
(
rt_drygood_smallshop_boxes
),
max
(
rt_drygood_smallshop_shops
),
sum
(
rt_drygood_dc_cost
),
sum
(
rt_drygood_dc_qty
),
sum
(
rt_drygood_dc_boxes
),
max
(
rt_drygood_dc_shops
),
sum
(
rt_fresh_supshop_cost
),
sum
(
rt_fresh_supshop_qty
),
max
(
rt_fresh_supshop_shops
),
sum
(
rt_fresh_smallshop_cost
),
sum
(
rt_fresh_smallshop_qty
),
max
(
rt_fresh_smallshop_shops
),
sum
(
rt_fresh_dc_cost
),
sum
(
rt_fresh_dc_qty
),
max
(
rt_fresh_dc_shops
)
from
fct_rt_dc_shop_sku_vender_day
frdssvd
where
stat_day
>=
toDate
(
'2016-01-01'
)
and
stat_day
<
addMonths
(
toDate
(
'2016-01-01'
),
1
)
group
by
stat_year
,
stat_month
,
out_buid
,
out_shop_id
,
in_shop_id
,
datasource
,
venderid
,
categorytreeid
,
categoryid
,
goodsid
,
logistics
,
buntype
,
dctype
,
shopformid
;
DROP
TABLE
fct_rt_dc_shop_sku_vender_day
;
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录