Q&A for people who build and repair bicycles, people who train cycling, or commute on bicycles
SELECT concat_ws( '-', YEAR ( creationdate ), RIGHT ( '00' + CONVERT ( NVARCHAR ( 2 ), MONTH ( creationdate )), 2 )) AS YEAR_MONTH, posttypeid, count( id ) AS cnt FROM posts GROUP BY PostTypeId, concat_ws( '-', YEAR ( creationdate ), RIGHT ( '00' + CONVERT ( NVARCHAR ( 2 ), MONTH ( creationdate )), 2 )) ORDER BY cnt DESC;