renyupeng0920 2 달 전
부모
커밋
b14731a593
1개의 변경된 파일6개의 추가작업 그리고 2개의 파일을 삭제
  1. 6 2
      Apietl/kwai_etl/report/AppKuaiShouAgentReport.py

+ 6 - 2
Apietl/kwai_etl/report/AppKuaiShouAgentReport.py

@@ -108,8 +108,12 @@ report.industry,
 report.second_industry,
 report.union_event_pay_purchase_amount_7d,
 report.union_event_pay_purchase_amount_7d_roi
-from (select * from media_api.kuaishou_agent_report_daily where stat_date={date_time}) report
-LEFT JOIN (
+from (select * from media_api.kuaishou_agent_report_daily where stat_date={date_time}
+and  advertiser_id in(
+select advertiser_id from media_api.kuaishou_account_report_daily where stat_date={date_time}
+and charge>0
+) report
+inner JOIN (
 SELECT
 cua.account_id id,
 cua.account_id account_id,