Zhao Tian Programmer 博客

mysql按日期分组统计的查询

SELECT DATE_FORMAT( deteline, "%Y-%m-%d %H" ) , COUNT( * ) 
FROM test
GROUP BY DATE_FORMAT( deteline, "%Y-%m-%d %H" ) 

评论

添加评论




预览