Number of questions/answers/posts per month of question's CreationDate


Please login or register to vote for this query.

(click on this box to dismiss)

Genealogy and Family History Meta

Q&A about the site for expert genealogists and people interested in genealogy or family history

SELECT eomonth(q.CreationDate) [month],
  CAST(COUNT(DISTINCT q.Id)+COUNT(DISTINCT a.Id) AS Integer) AS [Total Posts],
  COUNT(DISTINCT q.Id) AS [Total Questions],
  COUNT(DISTINCT a.Id) AS [Total Answers]
FROM Posts q INNER JOIN Posts a ON a.ParentId=q.Id
GROUP BY eomonth(q.CreationDate)
ORDER BY eomonth(q.CreationDate)
---a.CreationDate might be different from q.Creationdate
---I did not want to complicate the query too much and I wanted to have questions and answers in the same query

Enter Parameters

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