Average Question Score

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- Average Question Score

SELECT
  PostTypes.Name AS PostType,
  AVG(CAST(Posts.Score AS Float)) AS AvgScore
FROM
  Posts,
  PostTypes 
WHERE
  PostTypes.Id = 1
    AND
  Posts.ClosedDate IS NULL
    AND
  PostTypes.Id = Posts.PostTypeId 
GROUP BY PostTypes.Name

Enter Parameters

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