SELECT
DATE_FORMAT( datetime列, '%Y-%m-%d' ) AS 日期,
SUM( ... ) AS 合计,
COUNT( ... ) AS 行数
FROM
表
GROUP BY
DATE_FORMAT( datetime列, '%Y-%m-%d' )