Q&A for professional and enthusiast programmers
select cast(cast(yr as varchar(4))+'-'+cast(mnth as varchar(2))+'-01' as date) as dt ,mnth_count from ( select month(CreationDate) as mnth ,year(CreationDate) as yr ,count(*) as mnth_count from posts where tags like '%<r>%' group by month(CreationDate), year(CreationDate) ) as t order by yr asc, mnth asc