|
@@ -22,7 +22,7 @@ class AppKuaishouVideoReportBusi:
|
|
|
def taskHandler(self):
|
|
|
try:
|
|
|
sql_porject = """select advertiser_id from media_api.kuaishou_material_video_report_daily
|
|
|
-where stat_date >= date_format(date_sub({date_time}, INTERVAL ({day_count} -1 ) DAY),'%Y%m%d')
|
|
|
+where stat_date between date_format(date_sub({date_time}, INTERVAL ({day_count} -1 ) DAY),'%Y%m%d') and {date_time}
|
|
|
group by advertiser_id """.format(date_time=self.date_time,day_count=self.day_count)
|
|
|
account_list = TidbConn.quary(self.conn, sql_porject)
|
|
|
for account_id in account_list:
|
|
@@ -323,7 +323,7 @@ ifnull(round(sum(ad_photo_played_2s_ratio)/{day_count}*100,3),0) ad_photo_played
|
|
|
ifnull(round(sum(event_outbound_call_ratio)/sum(activation)*100,3),0) event_outbound_call_ratio,
|
|
|
sum(event_ad_watch_times) event_ad_watch_times
|
|
|
from media_api.kuaishou_material_video_report_daily
|
|
|
-where stat_date >= date_format(date_sub({date_time}, INTERVAL ({day_count} -1 ) DAY),'%Y%m%d')
|
|
|
+where stat_date between date_format(date_sub({date_time}, INTERVAL ({day_count} -1 ) DAY),'%Y%m%d') and {date_time}
|
|
|
and advertiser_id={account_id}
|
|
|
group by
|
|
|
advertiser_id,
|