|
@@ -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
|