|
@@ -33,6 +33,9 @@
|
|
|
<sql id="shareIaaAmount">
|
|
<sql id="shareIaaAmount">
|
|
|
round(ifnull(sum(share_iaa_amount), 0), 2) as share_iaa_amount
|
|
round(ifnull(sum(share_iaa_amount), 0), 2) as share_iaa_amount
|
|
|
</sql>
|
|
</sql>
|
|
|
|
|
+ <sql id="shareIaaAmount3">
|
|
|
|
|
+ round(ifnull(sum(share_iaa_amount_3), 0), 2) as share_iaa_amount_3
|
|
|
|
|
+ </sql>
|
|
|
<sql id="iaaAmount">
|
|
<sql id="iaaAmount">
|
|
|
round(ifnull(sum(iaa_amount), 0), 2) as iaa_amount
|
|
round(ifnull(sum(iaa_amount), 0), 2) as iaa_amount
|
|
|
</sql>
|
|
</sql>
|
|
@@ -175,6 +178,8 @@
|
|
|
<include refid="realCostAmount"/>,
|
|
<include refid="realCostAmount"/>,
|
|
|
<include refid="iaaRoi"/>,
|
|
<include refid="iaaRoi"/>,
|
|
|
<include refid="iapRoi"/>,
|
|
<include refid="iapRoi"/>,
|
|
|
|
|
+ <include refid="sharePayAmount"/>,
|
|
|
|
|
+ <include refid="shareIaaAmount3"/>,
|
|
|
round(ifnull(sum(hour_cost_amount), 0), 2) as hour_cost_amount
|
|
round(ifnull(sum(hour_cost_amount), 0), 2) as hour_cost_amount
|
|
|
from
|
|
from
|
|
|
(select product_id from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type not in (2,4,6))
|
|
(select product_id from application.media_product_report_daily where stat_date=${date} and ma_appid in (select app_id from tidb.deepthink.mini_app_info where business_type not in (2,4,6))
|
|
@@ -422,6 +427,8 @@
|
|
|
select tb5.dept_id, tb5.dept_name,
|
|
select tb5.dept_id, tb5.dept_name,
|
|
|
rank() over (order by sum(cost_amount) desc) as rk,
|
|
rank() over (order by sum(cost_amount) desc) as rk,
|
|
|
<include refid="costAmount"/>,
|
|
<include refid="costAmount"/>,
|
|
|
|
|
+ <include refid="sharePayAmount"/>,
|
|
|
|
|
+ <include refid="shareIaaAmount3"/>,
|
|
|
<include refid="iaaRoi"/>,
|
|
<include refid="iaaRoi"/>,
|
|
|
<include refid="iapRoi"/>
|
|
<include refid="iapRoi"/>
|
|
|
from
|
|
from
|