Median User Reputation

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

SELECT
(
(SELECT MAX(Reputation) FROM
   (SELECT TOP 50 PERCENT Reputation FROM Users where Reputation > 1 ORDER BY Reputation ) AS bottomhalf)
 +
 (SELECT MIN(Reputation) FROM
   (SELECT TOP 50 PERCENT Reputation FROM Users where Reputation > 1 ORDER BY Reputation DESC ) AS tophalf)
) / 2 AS Median

Enter Parameters

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