Mysql统计一天中每小时数据量sql如下1
2
3
4
5
6
7select created, count(created)
from (
select DATE_FORMAT( created ,'%Y-%m-%d %H') created
from shop_check_result
where created > '2018-10-08 00:00:00' and created < '2018-10-09 00:00:00'
) a
group by created;