|
@@ -96,7 +96,7 @@ where date_format(stat_date,'%Y%m%d')={date_time} group by account_id) t3
|
|
|
on t1.account_id=t3.account_id
|
|
|
left join
|
|
|
(select t2.account_id,count(distinct t1.material_id) new_eff_material from
|
|
|
-(select material_id from app_kuaishou_material_info where effect_date={date_time}) t1
|
|
|
+(select material_id from application.app_kuaishou_material_info where effect_date={date_time}) t1
|
|
|
inner join
|
|
|
(select distinct account_id,signature from `media_api`.kuaishou_video_list where date_format(stat_date,'%Y%m%d')>=
|
|
|
date_sub({date_time},INTERVAL 29 DAY)) t2
|
|
@@ -104,7 +104,7 @@ on t1.material_id=t2.signature group by t2.account_id) t4
|
|
|
on t1.account_id=t4.account_id
|
|
|
left join
|
|
|
(select t2.account_id,count(distinct t1.material_id) new_hot_material from
|
|
|
-(select material_id from app_kuaishou_material_info where faddish_date={date_time}) t1
|
|
|
+(select material_id from application.app_kuaishou_material_info where faddish_date={date_time}) t1
|
|
|
inner join
|
|
|
(select distinct account_id,signature from `media_api`.kuaishou_video_list where date_format(stat_date,'%Y%m%d')>=
|
|
|
date_sub({date_time},INTERVAL 29 DAY)) t2
|
|
@@ -172,8 +172,8 @@ t3.day_num new_video_num,
|
|
|
0 effect_num,
|
|
|
0 new_effect_num,
|
|
|
0 hot_num,
|
|
|
-0 put_campaign_num,
|
|
|
0 new_hot_num,
|
|
|
+0 put_campaign_num,
|
|
|
0 put_unit_num,
|
|
|
0 trust_campaign_num,
|
|
|
0 trust_unit_num
|
|
@@ -226,7 +226,7 @@ WHERE
|
|
|
cua.account_id IS NOT NULL and cua.account_status=0 and cua.media_id=2
|
|
|
) bei
|
|
|
ON t1.account_id = bei.account_id where tt.account_id is null and bei.account_id is not null) m;
|
|
|
- """.format(date_time=self.date_time)
|
|
|
+ """.format(date_time=self.date_time)
|
|
|
TidbConn.upsert(conn=self.conn, sql_buff=sql)
|
|
|
self.conn.commit()
|
|
|
TidbConn.conn_close(conn=self.conn)
|