|
@@ -18,7 +18,9 @@ select
|
|
dt1,channel1,pitcher,stage,platform,book,
|
|
dt1,channel1,pitcher,stage,platform,book,
|
|
if(stage ='趣程15期' or stage ='趣程26期' or stage ='趣程30期','GDT','MP'),
|
|
if(stage ='趣程15期' or stage ='趣程26期' or stage ='趣程30期','GDT','MP'),
|
|
order_count,create_user_num,reg_num,
|
|
order_count,create_user_num,reg_num,
|
|
- game_user_sum,third_stay_rate,second_stay_rate,
|
|
|
|
|
|
+ game_user_sum,third_stay_rate,sixty_stay_rate, fortyfive_stay_rate,
|
|
|
|
+ thirty_stay_rate,fifteen_stay_rate,seven_stay_rate,
|
|
|
|
+ second_stay_rate,
|
|
today_active_user_rate,
|
|
today_active_user_rate,
|
|
order_user,order_amount,
|
|
order_user,order_amount,
|
|
first_order_count,first_order_user,first_order_amount,
|
|
first_order_count,first_order_user,first_order_amount,
|
|
@@ -34,7 +36,8 @@ from (
|
|
select
|
|
select
|
|
if(dt4='1970-01-01',dt,dt4) dt1,if(channel4='',channel,channel4) channel1,
|
|
if(dt4='1970-01-01',dt,dt4) dt1,if(channel4='',channel,channel4) channel1,
|
|
create_user_num,reg_num,today_active_user_rate,second_stay_rate ,third_stay_rate ,
|
|
create_user_num,reg_num,today_active_user_rate,second_stay_rate ,third_stay_rate ,
|
|
- game_user_sum ,
|
|
|
|
|
|
+ game_user_sum ,seven_stay_rate, fifteen_stay_rate,thirty_stay_rate,
|
|
|
|
+ fortyfive_stay_rate,sixty_stay_rate,
|
|
pitcher,stage,platform,book,cost,view_count,click_count, ---基础属性和消耗数据
|
|
pitcher,stage,platform,book,cost,view_count,click_count, ---基础属性和消耗数据
|
|
follow_user,web_view_count,platform_view_count,web_order_count,type,
|
|
follow_user,web_view_count,platform_view_count,web_order_count,type,
|
|
require_roi,require_mult,order_count,order_user,order_amount from
|
|
require_roi,require_mult,order_count,order_user,order_amount from
|
|
@@ -79,7 +82,7 @@ left outer join
|
|
having order_amount+cost+reg_order_amount>0"""
|
|
having order_amount+cost+reg_order_amount>0"""
|
|
|
|
|
|
data = ck.execute(sql)
|
|
data = ck.execute(sql)
|
|
- isql = "replace into dw_channel values (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)"
|
|
|
|
|
|
+ isql = "replace into dw_channel values (%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)"
|
|
# db.dm.execute("truncate table dw_channel")
|
|
# db.dm.execute("truncate table dw_channel")
|
|
db.dm.executeMany(isql, data)
|
|
db.dm.executeMany(isql, data)
|
|
|
|
|