查询出本年全部年月
select concat((select year(now())),'-01') as count_date
union select concat((select year(now())),'-02')
union select concat((select year(now())),'-03')
union select concat((select year(now())),'-04')
union select concat((select year(now())),'-05')
union select concat((select year(now())),'-06')
union select concat((select year(now())),'-07')
union select concat((select year(now())),'-08')
union select concat((select year(now())),'-09')
union select concat((select year(now())),'-10')
union select concat((select year(now())),'-11')
union select concat((select year(now())),'-12')
查询本月全部天数
SELECT
date_format(
date_add( DATE_ADD( curdate(), INTERVAL - DAY ( curdate())+ 1 DAY ), INTERVAL ( cast( help_topic_id AS signed INTEGER ) + 0 ) DAY ),
'%Y-%m-%d'
) count_date
FROM
mysql.help_topic
WHERE
help_topic_id < DAY (
last_day(
DATE_ADD( curdate(), INTERVAL - DAY ( curdate())+ 1 DAY )))
ORDER BY
help_topic_id