SELECT DATEADD(month,DateDiff(month, 0, p.creationDate),0...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Anime and Manga

Q&A for anime and manga fans

SELECT
  DATEADD(month,DateDiff(month, 0, p.creationDate),0) as Timestamp,
  SUM(CASE p.PostTypeId WHEN 1 THEN 1 ELSE NULL END) as 'Questions asked',
  SUM(CASE p.PostTypeId WHEN 2 THEN 1 ELSE NULL END) as 'Answers provided'
FROM
  Posts p
WHERE p.PostTypeId = 1 OR p.PostTypeId = 2 AND p.CreationDate > '2018-01-01'
GROUP BY DateDiff(month, 0, p.creationDate)
ORDER BY Timestamp DESC

Enter Parameters

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