My Rep Score Percentile


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, 

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

Enter Parameters

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