|
@@ -393,6 +393,7 @@
|
|
where stat_date >= #{startTime}
|
|
where stat_date >= #{startTime}
|
|
AND stat_date <= #{endTime}
|
|
AND stat_date <= #{endTime}
|
|
AND t6.state = 1
|
|
AND t6.state = 1
|
|
|
|
+ and t2.account_status = 0
|
|
<if test="userIds != null">
|
|
<if test="userIds != null">
|
|
AND t2.user_id IN
|
|
AND t2.user_id IN
|
|
<foreach item="id" index="index" collection="userIds"
|
|
<foreach item="id" index="index" collection="userIds"
|
|
@@ -418,6 +419,7 @@
|
|
LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
where stat_date >= #{startTime}
|
|
where stat_date >= #{startTime}
|
|
AND stat_date <= #{endTime}
|
|
AND stat_date <= #{endTime}
|
|
|
|
+ and t2.account_status = 0
|
|
<if test="userIds != null">
|
|
<if test="userIds != null">
|
|
AND t2.user_id IN
|
|
AND t2.user_id IN
|
|
<foreach item="id" index="index" collection="userIds"
|
|
<foreach item="id" index="index" collection="userIds"
|
|
@@ -477,12 +479,7 @@
|
|
t2.project_id 'projectId',
|
|
t2.project_id 'projectId',
|
|
t3.project_name as 'projectName',
|
|
t3.project_name as 'projectName',
|
|
IFNULL(ROUND(SUM(play_3s_count) / SUM(aclick) * 100, 2), 0) as 'play3sRatio',
|
|
IFNULL(ROUND(SUM(play_3s_count) / SUM(aclick) * 100, 2), 0) as 'play3sRatio',
|
|
- (
|
|
|
|
- SELECT count(1) FROM ctop_etl_kuaishou_report_account_daily i1
|
|
|
|
- LEFT JOIN ctop_user_allocation i2 ON i1.account_id = i2.account_id
|
|
|
|
- where project_id = t3.id and account_status = 0
|
|
|
|
- AND i1.stat_date >= #{startTime}
|
|
|
|
- AND i1.stat_date <= #{endTime}) as 'accountCount',
|
|
|
|
|
|
+ t7.accountCount as 'accountCount',
|
|
IFNULL(t4.userCount,0) as 'userCount'
|
|
IFNULL(t4.userCount,0) as 'userCount'
|
|
FROM ctop_etl_kuaishou_report_account_daily t1
|
|
FROM ctop_etl_kuaishou_report_account_daily t1
|
|
LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
LEFT JOIN ctop_user_allocation t2 ON t1.account_id = t2.account_id
|
|
@@ -508,6 +505,15 @@
|
|
</foreach>
|
|
</foreach>
|
|
GROUP BY i1.account_id
|
|
GROUP BY i1.account_id
|
|
) t6 ON t2.account_id = t6.account_id
|
|
) t6 ON t2.account_id = t6.account_id
|
|
|
|
+ LEFT JOIN (
|
|
|
|
+ SELECT project_id ,count(1) as 'accountCount' FROM (
|
|
|
|
+ SELECT i2.project_id,i2.account_id FROM ctop_etl_kuaishou_report_account_daily i1
|
|
|
|
+ LEFT JOIN ctop_user_allocation i2 ON i1.account_id = i2.account_id
|
|
|
|
+ where account_status = 0
|
|
|
|
+ AND i1.stat_date >= #{startTime}
|
|
|
|
+ AND i1.stat_date <= #{endTime}
|
|
|
|
+ GROUP BY project_id,i1.account_id ) t GROUP BY t.project_id
|
|
|
|
+ ) t7 on t2.project_id = t7.project_id
|
|
where t1.stat_date >= #{startTime}
|
|
where t1.stat_date >= #{startTime}
|
|
AND t1.stat_date <= #{endTime}
|
|
AND t1.stat_date <= #{endTime}
|
|
AND t2.user_id in
|
|
AND t2.user_id in
|