SELECT Year(p.CreationDate) [year], COUNT(p.Id) AS [Total...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Earth Science Meta

Q&A about the site for those interested in the geology, meteorology, oceanography, and environmental sciences

SELECT Year(p.CreationDate) [year],
  COUNT(p.Id) AS [Total Posts],
  SUM(case when p.PostTypeId = 1 then 1 else 0 end) AS [Total Questions],
  SUM(case when p.PostTypeId = 2 then 1 else 0 end) AS [Total Answers]
FROM Posts p
GROUP BY Year(p.CreationDate)
ORDER BY Year(p.CreationDate)

Enter Parameters

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