|
@@ -27,16 +27,16 @@ 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,
|
|
|
0 as web_view_count,
|
|
|
0 as platform_view_count,
|
|
|
- 0 as web_order_count,'MP' type
|
|
|
+ 0 as web_order_count
|
|
|
from daily_vx where date='{0} 00:00:00'
|
|
|
union
|
|
|
select account_id,cost,view_count,valid_click_count,from_follow_uv,
|
|
|
ifnull(web_commodity_page_view_count,0) as web_view_count,
|
|
|
ifnull(platform_page_view_count,0) as platform_view_count,
|
|
|
- ifnull(web_order_count,0) as web_order_count,'GDT' type
|
|
|
+ ifnull(web_order_count,0) as web_order_count
|
|
|
from daily_qq where date='{0} 00:00:00' ) a
|
|
|
left join
|
|
|
- (select account_id,channel from channel_by_account_daily where dt='{0}') b
|
|
|
+ (select account_id,channel,type from channel_by_account_daily where dt='{0}') b
|
|
|
on a.account_id=b.account_id group by channel)
|
|
|
z on x.channel=z.channel
|
|
|
|
|
@@ -64,9 +64,9 @@ def channel_by_account_daily(ymd):
|
|
|
print("run> channel_by_account_daily")
|
|
|
sql="""replace into channel_by_account_daily
|
|
|
select '{0}' as dt,a.account_id as account_id, ifnull(ifnull(b.name,a.name),'') as channel,type from
|
|
|
- (select account_id,name,'qq' type from advertiser_qq
|
|
|
+ (select account_id,name,'GDT' type from advertiser_qq
|
|
|
union
|
|
|
- select account_id,name,'vx' type from advertiser_vx
|
|
|
+ select account_id,name,'MP' type from advertiser_vx
|
|
|
) a
|
|
|
left join
|
|
|
(select b.account_id,b.name from
|
|
@@ -77,6 +77,8 @@ def channel_by_account_daily(ymd):
|
|
|
|
|
|
|
|
|
|
|
|
+
|
|
|
+
|
|
|
def channel_info_daily(ymd):
|
|
|
"""获取公众号某天的期数,投手,平台,书籍
|
|
|
@ return [[]]
|
|
@@ -122,6 +124,7 @@ def channel_info_daily(ymd):
|
|
|
i[3]=j[1]
|
|
|
for k in platform_change:
|
|
|
if i[1]==k[0]:
|
|
|
+
|
|
|
i[4]=k[1]
|
|
|
for h in book_change:
|
|
|
if i[1]==h[0]:
|