SELECT DATE_FORMAT( startDateTime, "%Y-%m-%d %H" ) AS date, COUNT(*) AS num
FROM data_service
GROUP BY date ORDER BY date;
按照每天每小时统计数量
End.
2022-07-09 15:52:24
SELECT DATE_FORMAT( startDateTime, "%Y-%m-%d %H" ) AS date, COUNT(*) AS num
FROM data_service
GROUP BY date ORDER BY date;
按照每天每小时统计数量
End.