StackOverflow Rank and Percentile

0

Please login or register to vote for this query.

(click on this box to dismiss)

Chemistry

Q&A for scientists, academics, teachers, and students in the field of chemistry

-- StackOverflow Rank and Percentile

WITH Rankings AS (
SELECT Id, Reputation, Ranking = ROW_NUMBER() OVER(ORDER BY Reputation DESC)
FROM Users
)
,Counts AS (
SELECT Count = COUNT(*)
FROM Users
)
SELECT Id, Reputation, Ranking, CAST(Ranking AS decimal(20, 5)) / (SELECT Count FROM Counts) AS Percentile
FROM Rankings
WHERE Id = 20027803

Enter Parameters

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