SELECT
create_time,
total1 as "小计",
@total := @total + total1 AS "总计"
FROM
(
SELECT
date(create_time) AS create_time,
sum(1) AS total1
FROM
sys_wx_user
GROUP BY
date(create_time)
) AS temp,
(SELECT @total := 0) AS T1
ORDER BY
create_time;