|
@@ -629,7 +629,7 @@
|
|
select
|
|
select
|
|
concat(#{startDate}, '~' , #{endDate}) as 'statDate',
|
|
concat(#{startDate}, '~' , #{endDate}) as 'statDate',
|
|
b.project_id as 'projectId',
|
|
b.project_id as 'projectId',
|
|
- (SELECT project_name FROM ctop_peoject where id = b.project_id) as 'projectName',
|
|
|
|
|
|
+ (SELECT project_name FROM ctop_project where id = b.project_id) as 'projectName',
|
|
(select name from ctop_advertiser where id = b.advertiser_id) as 'advertiserName',
|
|
(select name from ctop_advertiser where id = b.advertiser_id) as 'advertiserName',
|
|
(
|
|
(
|
|
select realname from sys_user where id = (
|
|
select realname from sys_user where id = (
|
|
@@ -641,7 +641,7 @@
|
|
select design_responsible_id from ctop_project where id = b.project_id
|
|
select design_responsible_id from ctop_project where id = b.project_id
|
|
)
|
|
)
|
|
) as 'designResponsibleName',
|
|
) as 'designResponsibleName',
|
|
- ifnull(round(sum(a.charge),2),0) as 'charge',
|
|
|
|
|
|
+ ifnull(round(sum(a.charge),3),0) as 'charge',
|
|
ifnull(sum(a.photo_show),0) as 'photoShow', -- 封面曝光数
|
|
ifnull(sum(a.photo_show),0) as 'photoShow', -- 封面曝光数
|
|
ifnull(sum(a.photo_click),0) as 'photoClick', -- 封面点击数
|
|
ifnull(sum(a.photo_click),0) as 'photoClick', -- 封面点击数
|
|
ifnull(sum(a.aclick),0) as 'aclick', -- 素材曝光数
|
|
ifnull(sum(a.aclick),0) as 'aclick', -- 素材曝光数
|
|
@@ -691,7 +691,8 @@
|
|
) as 'eventNextDayStayCost' -- 次日留存成本
|
|
) as 'eventNextDayStayCost' -- 次日留存成本
|
|
from
|
|
from
|
|
ctop_kuaishou_report_daily_account a
|
|
ctop_kuaishou_report_daily_account a
|
|
- left join ctop_user_allocation b on a.account_id = b.account_id
|
|
|
|
|
|
+ left join ctop_user_allocation b
|
|
|
|
+ on a.account_id = b.account_id
|
|
where
|
|
where
|
|
a.stat_date >= #{startDate}
|
|
a.stat_date >= #{startDate}
|
|
and
|
|
and
|
|
@@ -703,7 +704,6 @@
|
|
#{item}
|
|
#{item}
|
|
</foreach>
|
|
</foreach>
|
|
group by b.project_id
|
|
group by b.project_id
|
|
- order by sum(a.charge) desc
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<!-- 计划汇总 -->
|
|
<!-- 计划汇总 -->
|