Question 1


Please login or register to vote for this query.

(click on this box to dismiss)

Meta Stack Exchange

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(*)
FROM Posts
GROUP By concat(YEAR(CreationDate), '-', MONTH(CreationDate))
ORDER BY year_month;

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results