Time to first answer (by specific user)

0

Please login or register to vote for this query.

(click on this box to dismiss)

Anime and Manga Meta

Q&A about the site for anime and manga fans

SELECT DATEDIFF(MINUTE, q.CreationDate, a.CreationDate),
  COUNT(*) AS 'Number of questions answered within x minutes'
  FROM Posts AS q
  CROSS APPLY (
    SELECT MIN(CreationDate) AS CreationDate
      FROM Posts
      WHERE ParentId = q.Id
        AND OwnerUserId = ##UserId:int##
        -- merged questions can have older answers
        AND CreationDate >= q.CreationDate
  ) a
  WHERE DATEDIFF(MINUTE, q.CreationDate, a.CreationDate) < 300
  GROUP BY DATEDIFF(MINUTE, q.CreationDate, a.CreationDate)
  ORDER BY DATEDIFF(MINUTE, q.CreationDate, a.CreationDate)

Enter Parameters

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