StackOverflow Overall Rank and Percentile over 200 Reputation

1

Please login or register to vote for this query.

(click on this box to dismiss)

Cardano Meta

Q&A for users and developers of the Cardano cryptocurrency ecosystem

-- Oldschool StackOverflow overall 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 > 200
)
SELECT
  Id,
  Ranking, 
  CAST(Ranking AS decimal(20, 5)) / (SELECT Count FROM Counts) AS Percentile
FROM Rankings
WHERE Id = ##UserId##

Enter Parameters

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