SELECT Sum(CASE WHEN Reputation >= 100000 THEN 1 ELSE 0 E...

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
  Sum(CASE WHEN Reputation >= 100000 THEN 1 ELSE 0 END) As '100,000+',
  Sum(CASE WHEN Reputation >=  50000 THEN 1 ELSE 0 END) As  '50,000+',
  Sum(CASE WHEN Reputation >=  25000 THEN 1 ELSE 0 END) As  '25,000+',
  Sum(CASE WHEN Reputation >=  10000 THEN 1 ELSE 0 END) As  '10,000+',
  Sum(CASE WHEN Reputation >=   5000 THEN 1 ELSE 0 END) As   '5,000+',
  Sum(CASE WHEN Reputation >=   2000 THEN 1 ELSE 0 END) As   '2,000+',
  Sum(CASE WHEN Reputation >=   1000 THEN 1 ELSE 0 END) As   '1,000+',
  Sum(CASE WHEN Reputation >=    500 THEN 1 ELSE 0 END) As     '500+',
  Sum(CASE WHEN Reputation >=    200 THEN 1 ELSE 0 END) As     '200+',
  Sum(CASE WHEN Reputation >=      1 THEN 1 ELSE 0 END) As       '1+',
  Sum(CASE WHEN Reputation >= -99999 THEN 1 ELSE 0 END) As      'All'
FROM
  Users;

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results