Commit ad7c821f by mengdongxing

Update tkdm_output_app_cumsum_all.sql

parent a97ffa47
......@@ -2,6 +2,8 @@ insert overwrite table tkdm.tkdm_output_app_cumsum_all partition(ds='$ds')
select '$ds' as dt,
appid,
sum(cum_num_click) as cum_num_click,
sum(cum_dupnum_click_day) as cum_dupnum_click_day,
sum(cum_dupnum_click_all) as cum_dupnum_click_all,
sum(cum_num_install) as cum_num_install,
sum(cum_dupnum_reged_day) as cum_dupnum_reged_day,
......@@ -13,6 +15,8 @@ select '$ds' as dt,
from (
select appid,
cum_num_click,
cum_dupnum_click_day,
cum_dupnum_click_all,
cum_num_install,
cum_dupnum_reged_day,
......@@ -28,6 +32,8 @@ select appid,
union all
select appid,
sum(num_click) as cum_num_click,
sum(dupnum_click_day) as cum_dupnum_click_day,
sum(dupnum_click_all) as cum_dupnum_click_all,
sum(num_install) as cum_num_install,
sum(dupnum_reged_day) as cum_dupnum_reged_day,
......@@ -46,6 +52,8 @@ select appid,
create EXTERNAL table tkdm_output_app_cumsum_all(
dt string,
appid string,
cum_num_click int,
cum_dupnum_click_day int ,
cum_dupnum_click_all int,
cum_num_install int,
cum_dupnum_reged_day int,
......@@ -59,4 +67,4 @@ PARTITIONED BY (ds string)
ROW FORMAT DELIMITED
FIELDS TERMINATED BY '\t'
location 's3://reyuntkio/warehouse/tkio/tkdm.db/tkdm_output_app_cumsum_all'
;
;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment