SELECT YEAR (p.CreationDate) AS YearDate, COUNT (p.Id) AS...


Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy

Q&A for science fiction and fantasy enthusiasts

SELECT YEAR (p.CreationDate) AS YearDate,
       COUNT (p.Id) AS PostCount,
       COUNT (c.Id) AS CommentCount
FROM Posts AS p
LEFT OUTER JOIN  Comments AS c ON p.Id = c.PostId
GROUP BY YEAR (p.CreationDate)
ORDER BY YEAR (p.CreationDate)

Enter Parameters

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