Average Answer Score

0

Please login or register to vote for this query.

(click on this box to dismiss)

The minumum, maximum and average answer score for a user. New version: Calculates average as a float instead of an int. New new version: Uses 'UserId' instead of 'userId'.

Mythology Meta

Q&A about the site for enthusiasts and scholars of mythology and folklore

-- Average Answer Score
-- The minumum, maximum and average answer score for a user.
-- New version: Calculates average as a float instead of an int.
-- New new version: uses  'UserId' instead of 'userId'

SELECT MIN(Score) AS Minimum,
       MAX(Score) AS Maximum,
       (SUM(Score) + 0.0) / Count(*) AS Average
  FROM Posts
 WHERE PostTypeId = 2
   AND OwnerUserId =  ##UserId##

Enter Parameters

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