My Rep Score Percentile

1

Please login or register to vote for this query.

(click on this box to dismiss)

Electrical Engineering

Q&A for electronics and electrical engineering professionals, students, and enthusiasts

SELECT X.Reputation, X.CumPct,
  100 - X.CumPct as TopPercent,
  ROUND((100 - X.CumPct) / 100 * Y.Total, 2) AS Rank, 
  Y.Total

FROM (SELECT Reputation,
    100.0 * SUM(COUNT(*)) OVER (ORDER BY Reputation) /
    SUM(COUNT(*)) OVER() AS CumPct
    FROM Users
    GROUP BY Reputation
    --ORDER BY X.Reputation
    ) AS X,
    
    (SELECT COUNT(*) AS Total 
    FROM Users 
    WHERE Reputation >= 1) AS Y
    
WHERE X.Reputation = 726

-- Forked from: smithmartin
-- https://meta.stackoverflow.com/questions/349805/where-do-i-stand-in-the-reputation-distribution
-- https://data.stackexchange.com/stackoverflow/query/676644/rep-distribution#resultSets

Enter Parameters

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