Logarithmic user reputation distribution

1

Please login or register to vote for this query.

(click on this box to dismiss)

Drupal Answers

Q&A for Drupal developers and administrators

declare @userCount bigint;
select @userCount = count(1)
from Users;

select POWER(10, FLOOR(LOG(u.Reputation, 10))) as RepGroup,
       count(1) as [Count],
       ROUND(count(1) * 100.0 / @userCount, 10) as [Percentage]
from Users u
group by POWER(10, FLOOR(LOG(u.Reputation, 10)))
order by RepGroup desc;

Enter Parameters

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