Przeglądaj źródła

‘修改null值’

zhl 3 lat temu
rodzic
commit
89da48697c

+ 2 - 1
Apietl/kwai_etl/Q4Task/AppKuaishouAccountReportBusi.py

@@ -293,7 +293,8 @@ 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_account_report_daily a  where stat_date >= date_format(date_sub({date_time}, INTERVAL ({day_count} -1 )  DAY),'%Y%m%d')
+ media_api.kuaishou_account_report_daily a 
+  where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count} -1  DAY),'%Y%m%d')
  group by advertiser_id) report
 LEFT JOIN (
 SELECT

+ 2 - 1
Apietl/kwai_etl/Q4Task/AppKuaishouAccountReportBusiMonth.py

@@ -293,7 +293,8 @@ 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_account_report_daily a  where stat_date >= date_format(date_sub({date_time}, INTERVAL ({day_count})  DAY),'%Y%m%d')
+ media_api.kuaishou_account_report_daily a  
+where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count} DAY),'%Y%m%d')
  group by advertiser_id) report
 LEFT JOIN (
 SELECT

+ 2 - 1
Apietl/kwai_etl/Q4Task/AppKuaishouCampaignReportBusi.py

@@ -297,7 +297,8 @@ 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_campaign_report_daily  a  where stat_date >= date_format(date_sub({date_time}, INTERVAL ({day_count} -1 )  DAY),'%Y%m%d')
+ media_api.kuaishou_campaign_report_daily  a  
+ where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count} -1  DAY),'%Y%m%d')
  group by advertiser_id,campaign_id,campaign_name) report
 LEFT JOIN (
 SELECT

+ 1 - 1
Apietl/kwai_etl/Q4Task/AppKuaishouCampaignReportBusiMonth.py

@@ -298,7 +298,7 @@ ifnull(round(sum(event_outbound_call_ratio)/sum(activation)*100,3),0) event_outb
 sum(event_ad_watch_times) event_ad_watch_times
 from 
  media_api.kuaishou_campaign_report_daily  a  
- where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count}  DAY),'%Y%m%d')
+ where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count} DAY),'%Y%m%d')
  group by advertiser_id,campaign_id,campaign_name) report
 LEFT JOIN (
 SELECT

+ 2 - 1
Apietl/kwai_etl/Q4Task/AppKuaishouCompanyDesignReportBusi.py

@@ -309,7 +309,8 @@ report.charge ,
     report.event_ad_watch_times
 FROM
 (select * 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')) report
+where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count} -1  DAY),'%Y%m%d')
+) report
 LEFT JOIN 
 (select account_id,signature,photo_id from media_api.kuaishou_video_list  group by account_id,signature,photo_id) video 
  ON report.advertiser_id = video.account_id AND report.photo_id = video.photo_id 

+ 2 - 1
Apietl/kwai_etl/Q4Task/AppKuaishouCompanyDesignReportBusiMonth.py

@@ -310,7 +310,8 @@ report.charge ,
     report.event_ad_watch_times
 FROM
 (select * 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')) report
+where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count} DAY),'%Y%m%d')
+) report
 LEFT JOIN 
 (select account_id,signature,photo_id from media_api.kuaishou_video_list  group by account_id,signature,photo_id) video 
  ON report.advertiser_id = video.account_id AND report.photo_id = video.photo_id 

+ 3 - 1
Apietl/kwai_etl/Q4Task/AppKuaishouCompanyUserReportBusi.py

@@ -309,7 +309,9 @@ report.charge ,
     report.event_outbound_call_ratio,
     report.event_ad_watch_times
    from  
-   (select * from  media_api.kuaishou_account_report_daily  where stat_date >= date_format(date_sub({date_time}, INTERVAL ({day_count} -1 )  DAY),'%Y%m%d')) report
+   (select * from  media_api.kuaishou_account_report_daily  
+  where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count} -1  DAY),'%Y%m%d')
+  ) report
    left join 
    (
 SELECT

+ 2 - 1
Apietl/kwai_etl/Q4Task/AppKuaishouCompanyUserReportBusiMonth.py

@@ -310,7 +310,8 @@ report.charge ,
     report.event_ad_watch_times
    from  
    (select * from  media_api.kuaishou_account_report_daily 
-    where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count}  DAY),'%Y%m%d')) report
+    where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count} DAY),'%Y%m%d')
+    ) report
    left join 
    (
 SELECT

+ 3 - 2
Apietl/kwai_etl/Q4Task/AppKuaishouProductReportBusi.py

@@ -159,8 +159,9 @@ 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  
- (select * from  media_api.kuaishou_account_report_daily  where stat_date >= date_format(date_sub({date_time}, INTERVAL 
- ({day_count} -1 )  DAY),'%Y%m%d')) report
+ (select * from  media_api.kuaishou_account_report_daily  
+ where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count}-1 DAY),'%Y%m%d')
+ ) report
 LEFT JOIN `jeecg-boot`.ctop_user_allocation cua ON report.advertiser_id = cua.account_id
 LEFT JOIN `jeecg-boot`.ctop_project cp ON cua.project_id = cp.id
 LEFT JOIN `jeecg-boot`.ctop_product cn ON cp.product_id = cn.id

+ 3 - 2
Apietl/kwai_etl/Q4Task/AppKuaishouProductReportBusiMonth.py

@@ -159,8 +159,9 @@ 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  
- (select * from  media_api.kuaishou_account_report_daily  where stat_date >= date_format(date_sub({date_time}, INTERVAL 
- ({day_count})  DAY),'%Y%m%d')) report
+ (select * from  media_api.kuaishou_account_report_daily  
+ where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count} DAY),'%Y%m%d')
+ ) report
 LEFT JOIN `jeecg-boot`.ctop_user_allocation cua ON report.advertiser_id = cua.account_id
 LEFT JOIN `jeecg-boot`.ctop_project cp ON cua.project_id = cp.id
 LEFT JOIN `jeecg-boot`.ctop_product cn ON cp.product_id = cn.id

+ 3 - 1
Apietl/kwai_etl/Q4Task/AppKuaishouProjectReportBusi.py

@@ -161,7 +161,9 @@ 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  
- (select * from  media_api.kuaishou_account_report_daily  where stat_date >= date_format(date_sub({date_time}, INTERVAL ({day_count} -1 )  DAY),'%Y%m%d')) report
+ (select * from  media_api.kuaishou_account_report_daily  
+ where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count} -1  DAY),'%Y%m%d')
+ ) report
 LEFT JOIN `jeecg-boot`.ctop_user_allocation cua ON report.advertiser_id = cua.account_id
 LEFT JOIN `jeecg-boot`.ctop_project cp ON cua.project_id = cp.id
 LEFT JOIN `jeecg-boot`.ctop_product cn ON cp.product_id = cn.id

+ 3 - 2
Apietl/kwai_etl/Q4Task/AppKuaishouProjectReportBusiMonth.py

@@ -161,8 +161,9 @@ 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  
- (select * from  media_api.kuaishou_account_report_daily  where stat_date >= date_format(date_sub({date_time}, INTERVAL 
- ({day_count})  DAY),'%Y%m%d')) report
+ (select * from  media_api.kuaishou_account_report_daily  
+ where stat_date >= date_format(date_sub({date_time}, INTERVAL {day_count} DAY),'%Y%m%d')
+ ) report
 LEFT JOIN `jeecg-boot`.ctop_user_allocation cua ON report.advertiser_id = cua.account_id
 LEFT JOIN `jeecg-boot`.ctop_project cp ON cua.project_id = cp.id
 LEFT JOIN `jeecg-boot`.ctop_product cn ON cp.product_id = cn.id

+ 1 - 1
Apietl/kwai_etl/Q4Task/AppKuaishouUnitReportBusi.py

@@ -306,7 +306,7 @@ ifnull(round(sum(event_outbound_call_ratio)/sum(activation)*100,3),0) event_outb
 sum(event_ad_watch_times) event_ad_watch_times
 from 
  media_api.kuaishou_unit_report_daily  a 
-where stat_date >= date_format(date_sub({date_time}, INTERVAL ({day_count} -1 )  DAY),'%Y%m%d')
+where stat_date >= date_format(date_sub({date_time}, INTERVAL ({day_count} -1 ) DAY),'%Y%m%d')
 and advertiser_id={account_id}
  group by advertiser_id,campaign_id,campaign_name,unit_id,unit_name) report
 LEFT JOIN (