Commit 7070f85e by mengdongxing

Update tkdm_base_device_pay_info.sql

parent e3b490e5
......@@ -15,11 +15,11 @@ select nvl(b.appid,a.appid) as appid,
nvl(b.num_payment_cnt,0)+nvl(a.num_payment_cnt,0) as num_payment_cnt,
nvl(b.num_payment_day,0)+nvl(a.num_payment_day,0) as num_payment_day,
round(nvl(b.amt_payment,0) + nvl(a.amt_payment,0),2) as amt_payment,
nvl(a.is_new,0) as is_new_for_last_ds
coalesce(a.ins_datetime,b.ins_datetime,'1970-01-01') as ins_datetime
from
(select appid,
deviceid,
is_new,
ins_datetime,
amt_payment,
num_payment_cnt,
1 as num_payment_day
......@@ -57,7 +57,7 @@ last_payment_ds string,
num_payment_cnt int,
num_payment_day int,
amt_payment double,
is_new_for_last_ds int
ins_datetime string
)
PARTITIONED BY (ds string)
clustered by (deviceid) sorted by(deviceid,appid) into 32 buckets
......
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