Average answer score by hours after the question

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physics

Q&A for active researchers, academics and students of physics

SELECT
  DATEDIFF(hh, Q.CreationDate, A.CreationDate) AS Days,
  AVG(1.0 * A.Score) AS AvgScore
FROM PostsWithDeleted Q, PostsWithDeleted A
WHERE
  A.ParentId = Q.Id
  AND
  A.CreationDate > Q.CreationDate
  AND
  DATEDIFF(hh, Q.CreationDate, A.CreationDate) < ##MaxHours:int?168##
GROUP BY DATEDIFF(hh, Q.CreationDate, A.CreationDate)
ORDER BY Days

Enter Parameters

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