SO_users_with_reputation_score

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT Id, Reputation, 
CASE
    WHEN Reputation > 25000 THEN 25000
    WHEN Reputation > 20000 THEN 20000
    WHEN Reputation > 10000 THEN 10000
    WHEN Reputation > 2000 THEN 2000
    WHEN Reputation > 1500 THEN 1500
    WHEN Reputation > 1000 THEN 1000
    WHEN Reputation > 500 THEN 500
    WHEN Reputation > 100 THEN 100
    ELSE 0
END AS ReputationGroup
INTO #reps
FROM Users;

SELECT ReputationGroup, COUNT(*) as 'count'
FROM #reps
GROUP BY ReputationGroup
ORDER BY ReputationGroup ASC;

Enter Parameters

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