What is meta? ×
Meta Stack Exchange is where users like you discuss bugs, features, and support issues that affect the software powering all 134 Stack Exchange communities.

I am trying to look at the trends in answers over time per month and I noticed the discrepancy in the following query:

alt text

The Answers column is the COUNT(*) of all Posts where PostTypeId = 2 i.e Answers.

The TotalAnswers column is the SUM(AnswerCount) from the AnswerCount field of the Posts table

I'd like to know, why is there such a large difference between these two columns? It is such a large number that I expect there is something going on here.

This query returns no results:

SELECT * FROM Posts
WHERE PostTypeId = 2
    AND ParentId IS NULL
share|improve this question

1 Answer 1

up vote 3 down vote accepted

Looking at the calculation carefully:

  • The Answers column shows the number of answers given in a month
  • The Total Answers column shows the total number of answers to questions asked in a month

Big difference. Either that wasn't the author's intent, or this information was omitted from the documentation.

This explains the large discrepancy, and also why the Total Answers column numbers are always lower than the Answers column.


This query returns no results:

SELECT * FROM Posts
WHERE PostTypeId = 2
   AND ParentId IS NULL

This query is selecting answers which have no associated question -- if it ever returns results, please let us know!

share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .