Q&A for active researchers, academics and students of physics
select sum(case when ct<10 then 1 else 0 end) as one, sum(case when ct>=10 and ct<=20 then 1 else 0 end) as two , sum(case when ct>20 then 1 else 0 end) as three from ( select owneruserid, count(PostTypeId) ct from posts where PostTypeId= 1 group by owneruserid )d;