StackOverflow Rank and Percentile

0

Please login or register to vote for this query.

(click on this box to dismiss)

Joomla Meta

Q&A about the site for Joomla! administrators, users, developers and designers

-- StackOverflow Rank and Percentile

WITH Rankings AS (
SELECT Id, Ranking = ROW_NUMBER() OVER(ORDER BY Reputation DESC)
FROM Users
)
,Counts AS (
SELECT Count = COUNT(*)
FROM Users
WHERE Reputation > 100
)
SELECT Id, Ranking, 100-(CAST(Ranking AS decimal(10, 5)) / (SELECT Count FROM Counts)) AS Percentile
FROM Rankings
WHERE Id = ##UserId## OR Id = 22656

Enter Parameters

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