Q&A per day


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT CONVERT(DATE, CreationDate, 101) AS [day], 
  SUM(CASE WHEN PostTypeId = 1 THEN 1 ELSE 0 END) as [Questions per Day],
  SUM(CASE WHEN PostTypeId = 2 THEN 1 ELSE 0 END) as [Answers per Day]
FROM Posts
WHERE Score >= 1 and CreationDate > '2014-01-01'
GROUP BY CONVERT(DATE, CreationDate, 101)
ORDER BY CONVERT(DATE, CreationDate, 101);

Enter Parameters

Switch to meta site
loading Hold tight while we fetch your results