Q&A for linguists, teachers and learners wanting to discuss the finer points of the Portuguese language
select count(case when kol<10 then 1 end) as len1, count(case when (kol>=10 and kol<=20) then 1 end) as len2, count(case when kol>20 then 1 end) as len3 from (select count(id) as kol,OwnerUserId from posts where (posttypeid=1 and OwnerUserId is not null) group by owneruserid) as t