4

I would like to determine on average how long it takes until a question gets its first/accepted answer.

I am running this SQL query (for first answer) in data.stackexchange.com:

SELECT AVG(CAST(VALUE AS BIGINT)) FROM (
    SELECT DATEDIFF(SECOND, Q.CreationDate,  MIN(A.CreationDate)) AS VALUE
    FROM [Posts] AS Q INNER JOIN [Posts] AS A ON Q.Id = A.ParentId
    GROUP BY Q.CreationDate
) MY_TABLE

The result is 865945 seconds.

And for accepted answer:

SELECT AVG(CAST(VALUE AS BIGINT)) FROM (
    SELECT DATEDIFF(SECOND, Q.CreationDate, A.CreationDate) AS VALUE
        FROM [Posts] AS Q INNER JOIN [Posts] AS A ON Q.AcceptedAnswerId = A.Id
) MY_TABLE

The result is 673663 seconds.

It seems pretty weird that getting an accepted answer occurs earlier than getting a first answer. How would you resolve this issue?

4

How would you resolve this issue?

A lot less questions get accepted than get answers.

Good questions will get answers faster, and therefore accepted answers faster.

Bad questions (and difficult ones) will get answers slower and therefore answers will get accepted much later, if at all.

  • Thanks for your response, you're correct. However seems your answer doesn't address the issue. I'm saying that First answer should be given earlier than accepted answer. As we know all accepted answers are of type answers and therefore regarding all cases, the time needed for first answer getting posted should be less than an answer getting accepted. Am I right? – frogatto Oct 27 '15 at 13:21
  • 1
    @abforce - there are a lot more first answers than accepted answers. You are not accounting for those. Also - accepted answers can be on answers that were not first. – Oded Oct 27 '15 at 13:23
  • 1
    Ohh understood! How beautiful is Stack Overflow ! I love it. Thanks very much. – frogatto Oct 27 '15 at 13:29

You must log in to answer this question.

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