select top 2000 Id, CreationDate, firstAnswerDate, (Id) A...


Please login or register to vote for this query.

(click on this box to dismiss)

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

select top 2000 Id, CreationDate, firstAnswerDate, (Id) AS [Postid], Score, Title, Tags,
  datediff(minute, question.creationDate, firstAnswerDate)
) as answerDiff
from (
  select *,
    select min(answer.CreationDate) from Posts answer
      answer.PostTypeId = 2
      -- successful answer (score is 5 or above)
      and answer.Score >= 5 
      and answer.DeletionDate is null
      and answer.parentId =
  ) as FirstAnswerDate
  from Posts question2
    question2.PostTypeId = 1
    and YEAR(question2.CreationDate) = 2019
) question
  -- successful question (score is 10 or above)
  question.Score >= 10
  -- at least 5 minutes (prevent auto-answered questions, spam, etc)
  and datediff(minute, question.creationDate, firstAnswerDate) >= 5
  and question.FirstAnswerDate is not null
order by answerDiff asc;

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results