LogScale reputation distribution, 1% bin precision


Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

-- Enter Query Title

-- using logarightmic binning algorithm from
-- https://github.com/dallaylaen/perl-Statistics-Descriptive-LogScale
-- to get distribution with 1% relative error
-- without fetching the whole table

SELECT power( 1.01, bin ) AS approx_rep, count(*) AS n FROM (
        SELECT floor( log(reputation) / log(1.01) + 0.5) AS bin 
        FROM users
    ) AS temp GROUP BY bin ORDER BY bin;

Enter Parameters

Switch sites:
loading Hold tight while we fetch your results