Q&A for meta-discussion of the Stack Exchange family of Q&A websites
---We want to get some ideas of how many posts were written each month.
---Use SQL to count the number of posts by year-month.
---Note that by year-month, we mean that May 2013 and May 2014 should be considered as different year-months.
---The result table should show year-month and count and order results by year-month.
SELECT concat(YEAR(CreationDate), '-', MONTH(CreationDate)) as year_month, count(*) AS cnt, PostTypeId
GROUP BY concat(YEAR(CreationDate), '-', MONTH(CreationDate)), PostTypeId
ORDER BY year_month;