1、强调:mysql内置的函数只能在sql语句中使用mysql> select date_format(sub_time,'%Y-%m'),count(id) from blog group by date_format(sub_time,'%Y-%m');