#统计2015年5月份之前的数据量 select count(1) from table_name where create_date < '2015-05-01 00:00:00'; ##统计2016年4月1号到2016年6月21号每天的数据量 SELECT create_date,SUM(1) FROM table_name WHERE DATE_FORMAT(create_date,'%Y-%m-%d') BETWEEN '2016-04-01' AND '2016-06-21' GROUP BY DATE_FORMAT(create_date, '%Y-%m-%d') ORDER BY create_date;
MySQL数据统计实例
猜你喜欢
转载自bijian1013.iteye.com/blog/2306541
今日推荐
周排行