Average Answer Score

1

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.

Stack Overflow

Q&A for professional and enthusiast programmers

-- Average Answer Score
-- The minumum, maximum and average answer score for a user.

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 sites:
loading Hold tight while we fetch your results