|
@@ -27,13 +27,13 @@ def dw_daily_channel_cost(ymd):
|
|
(select account_id,cost,view_count,valid_click_count,round(valid_click_count*official_account_follow_rate,0) as from_follow_uv,
|
|
(select account_id,cost,view_count,valid_click_count,round(valid_click_count*official_account_follow_rate,0) as from_follow_uv,
|
|
0 as web_view_count,
|
|
0 as web_view_count,
|
|
0 as platform_view_count,
|
|
0 as platform_view_count,
|
|
- 0 as web_order_count,'vx' type
|
|
|
|
|
|
+ 0 as web_order_count,'MP' type
|
|
from daily_vx where date='{0} 00:00:00'
|
|
from daily_vx where date='{0} 00:00:00'
|
|
union
|
|
union
|
|
select account_id,cost,view_count,valid_click_count,from_follow_uv,
|
|
select account_id,cost,view_count,valid_click_count,from_follow_uv,
|
|
ifnull(web_commodity_page_view_count,0) as web_view_count,
|
|
ifnull(web_commodity_page_view_count,0) as web_view_count,
|
|
ifnull(platform_page_view_count,0) as platform_view_count,
|
|
ifnull(platform_page_view_count,0) as platform_view_count,
|
|
- ifnull(web_order_count,0) as web_order_count,'qq' type
|
|
|
|
|
|
+ ifnull(web_order_count,0) as web_order_count,'GDT' type
|
|
from daily_qq where date='{0} 00:00:00' ) a
|
|
from daily_qq where date='{0} 00:00:00' ) a
|
|
left join
|
|
left join
|
|
(select account_id,channel from channel_by_account_daily where dt='{0}') b
|
|
(select account_id,channel from channel_by_account_daily where dt='{0}') b
|
|
@@ -158,8 +158,8 @@ def order_account_text():
|
|
db.quchen_text.execute("insert into order_account_text(platform,text) values ('文鼎','{}')".format(i))
|
|
db.quchen_text.execute("insert into order_account_text(platform,text) values ('文鼎','{}')".format(i))
|
|
|
|
|
|
if __name__ == '__main__':
|
|
if __name__ == '__main__':
|
|
-
|
|
|
|
- for i in dt.getDateLists('2020-04-23','2021-02-05'):
|
|
|
|
- print(i)
|
|
|
|
- dw_daily_channel_cost(i)
|
|
|
|
|
|
+ channel_by_account_daily('2021-02-05')
|
|
|
|
+ # for i in dt.getDateLists('2020-04-23','2021-02-05'):
|
|
|
|
+ # print(i)
|
|
|
|
+ # dw_daily_channel_cost(i)
|
|
|
|
|