Commit 69a29e52 by mengdongxing

Update tkdm_base_active_payment_info.sql

parent e408b967
......@@ -15,8 +15,8 @@ select /*+mapjoin(y)*/x.deviceid,
x.category_id,
x.isgame,
x.platform,
nvl(x.first_payment_ds,y.first_payment_ds) as first_payment_ds,
nvl(y.last_payment_ds,x.last_amt_payment) as last_payment_ds,
nvl(x.first_payment_ds,y.payment_ds) as first_payment_ds,
nvl(y.payment_ds,x.last_amt_payment) as last_payment_ds,
x.num_payment_cnt + y.num_payment_cnt as num_payment_cnt,
x.num_payment_day + y.num_payment_day as num_payment_day,
x.amt_payment +y.amt_payment as amt_payment,
......@@ -75,12 +75,12 @@ left join
(select deviceid,
appid,
to_date(ins_datetime) as ins_date,
'2017-02-25' as first_payment_ds,
'2017-02-25' as last_payment_ds,
'2017-02-25' as payment_ds,
num_payment_cnt,
1 as num_payment_day,
amt_payment
from tkdm.tkdm_data_payment_detial_day
where ds='2017-02-25'
) y on x.deviceid=y.deviceid and x.appid=y.appid
cluster by deviceid,appid
......@@ -109,3 +109,4 @@ FIELDS TERMINATED BY '\t'
STORED AS ORC
location 's3://reyuntkio/warehouse/tkio/tkdm.db/tkdm_base_active_payment_info'
;
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