Q&A about the site for science fiction and fantasy enthusiasts
select dist_views, count(*) as user_count from ( select case when Views between 0 and 10 then '1.(0 to 10)' when Views between 11 and 50 then '2.(11 to 50)' when Views between 51 and 100 then '3.(51 to 100)' when Views between 101 and 500 then '4.(101 to 500)' when Views between 501 and 1000 then '5.(501 to 1000)' when Views between 1001 and 5000 then '6.(1001 to 5000)' when Views between 5001 and 10000 then '7.(5001 to 10000)' when Views > 10000 then '8.(10000+)' end as dist_views from Users ) a group by dist_views;