MySQL按月、按年、按天、按周统计数据的方法
按日统计select DATE_FORMAT(date,’%Y%m%d’) days,count(id) count from table group by days;按周统计select DATE_FORMAT(date,’%Y%u’) weeks,count(id) count from table group by weeks按月统计select DATE_FORMAT(...