mysql 应用场景
一、按时间点来统计
SELECT id,COUNT(1), date_FORMAT(date_Field,'%Y-%m-%d %H:00:00') as dateStr from table_name group by dateStr
一、按时间点来统计
SELECT id,COUNT(1), date_FORMAT(date_Field,'%Y-%m-%d %H:00:00') as dateStr from table_name group by dateStr