Average answer score by hours after the question

1

Please login or register to vote for this query.

(click on this box to dismiss)

Physical Fitness Meta

Q&A about the site for physical fitness professionals, athletes, trainers, and those providing health-related needs

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