SELECT DATEDIFF(MINUTE, quest.CreationDate, ans.CreationD...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Role-playing Games

Q&A for gamemasters and players of tabletop, paper-and-pencil role-playing games

SELECT
  DATEDIFF(MINUTE, quest.CreationDate, ans.CreationDate) as [time to answer],
  COUNT(*)
FROM Posts ans
  JOIN PostTypes pt ON pt.Id = ans.PostTypeId
  JOIN Posts quest ON quest.Id = ans.ParentId
WHERE ans.PostTypeId = 2 
GROUP BY DATEDIFF(MINUTE, quest.CreationDate, ans.CreationDate)
ORDER BY [time to answer] ASC

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results