Forráskód Böngészése

Merge remote-tracking branch 'origin/master'

zhl 3 éve
szülő
commit
5b3e3f12ba
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      Apietl/kwai_etl/Q4Task/AppKuaishouVideoReportBusi.py

+ 2 - 2
Apietl/kwai_etl/Q4Task/AppKuaishouVideoReportBusi.py

@@ -62,9 +62,9 @@ CASE WHEN cmi.material_name IS NOT NULL THEN cmi.material_name
      ELSE video.photo_name END AS video_name,##视频名称
 case when video.channel_type = 1 then '素造' else '内部' end as  chl_name, #渠道名称
 up.company_id clip_company_id, #剪辑公司
-report.charge ,
 ifnull(ratio.charge,0) last_charge,
 ifnull(round((report.charge-ratio.charge)/ratio.charge*100,3),0) charge_ratio,
+report.charge ,
 report.`show`,
 report.photo_click,
 report.aclick ,
@@ -348,7 +348,7 @@ LEFT JOIN `jeecg-boot`.sys_user leader ON leader.id = cma.leader_id
 LEFT JOIN `jeecg-boot`.user_company up ON up.user_id = cma.clip_id 
 LEFT JOIN 
 (select advertiser_id account_id,photo_id,round(sum(charge),3) charge from `media_api`.kuaishou_material_video_report_daily a  
-where stat_date between date_format(date_sub(date_format(date_sub({date_time}, INTERVAL {day_count} DAY),'%Y%m%d'), INTERVAL {day_count}-1 DAY),'%Y%m%d') 
+where a.advertiser_id={account_id} and  stat_date between date_format(date_sub(date_format(date_sub({date_time}, INTERVAL {day_count} DAY),'%Y%m%d'), INTERVAL {day_count}-1 DAY),'%Y%m%d') 
 and date_format(date_sub({date_time}, INTERVAL {day_count} DAY),'%Y%m%d') 
 group by advertiser_id,photo_id) ratio
 on report.account_id=ratio.account_id and report.photo_id=ratio.photo_id