1. 按年月统计数据(mysql) select DATE_FORMAT(addtime, '%Y-%m') as my_month,count(*) from news group by my_month