Count questions per year

0

Please login or register to vote for this query.

(click on this box to dismiss)

Tridion

Q&A for Tridion developers and administrators

SELECT 
  DATEPART(year, p.CreationDate) AS "year",
  COUNT(*) AS "# questions"
FROM Posts p
  JOIN Users u ON u.Id = p.OwnerUserId
WHERE p.PostTypeId = 1 -- Questions
GROUP BY DATEPART(year, p.CreationDate)
ORDER BY year DESC

Enter Parameters

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