Questions with highest average score of answers

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 TOP(##num?100##)
RANK() OVER(ORDER BY AVG(CAST(a.Score AS decimal)) DESC) AS Rank,
q.Id AS [Post Link],
AVG(CAST(a.Score AS decimal)) AS [Average Score],
SUM(a.Score) AS [Total Score],
COUNT(a.Id) AS [# of answers]
FROM Posts q INNER JOIN Posts a ON a.ParentId=q.Id
GROUP BY q.Id
HAVING (COUNT(a.Id)>=##min?2##)
ORDER BY AVG(CAST(a.Score AS decimal)) DESC

Enter Parameters

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