统计不同渠道的的UV,再合计渠道总计UV

( SELECT `统计时间`, `贷款公司名称`, `推广员姓名`, UV FROM ac_statistics WHERE `贷款公司名称` = "金腰袋" AND `统计时间` LIKE '%2019-04-19%' ) UNION
(
SELECT
'合计' AS 统计时间,
'' AS 贷款公司名称,
'' AS 推广员姓名,
SUM( UV ) FROM ac_statistics
WHERE
`贷款公司名称` = "金腰袋"
AND `统计时间` LIKE '%2019-04-19%'
GROUP BY
贷款公司名称
)

猜你喜欢

转载自www.cnblogs.com/kingboy-xin/p/10741590.html
Uv
今日推荐