|
@@ -24,7 +24,8 @@ select
|
|
|
0 total_first_amount,
|
|
|
require_roi,require_mult
|
|
|
from
|
|
|
-(select dt,channel, pitcher,stage,platform,book,cost,view_count,click_count,follow_user,web_view_count,platform_view_count,web_order_count,type,require_roi,require_mult from dw_daily_channel_cost) a
|
|
|
+(select dt,channel, pitcher,stage,platform,book,cost,view_count,click_count,follow_user,web_view_count,platform_view_count,web_order_count,
|
|
|
+case type when 'vx' then 'MP' when 'qq' then 'GDT' else type end type,require_roi,require_mult from dw_daily_channel_cost) a
|
|
|
left outer join
|
|
|
(select toDate(formatDateTime(reg_time,'%Y-%m-%d')) as dt2,channel as channel2,
|
|
|
sum(amount) as reg_order_amount,
|
|
@@ -74,7 +75,7 @@ select formatDateTime(reg_time,'%Y-%m-%d') reg_date,channel,count(1) user_order_
|
|
|
def dw_channel_daily():
|
|
|
sql="""
|
|
|
select
|
|
|
- dt,channel,pitcher,stage,platform,book,type,
|
|
|
+ dt,channel,pitcher,stage,platform,book,case type when 'vx' then 'MP' when 'qq' then 'GDT' else type end type,
|
|
|
order_count,order_user,order_amount,
|
|
|
first_order_count,first_order_user,first_order_amount,
|
|
|
view_count,click_count,follow_user,
|