Logarithmic user reputation distribution

1

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow на русском Meta

Вопросы и ответы о сайте для программистов

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 main site
loading Hold tight while we fetch your results