select count(case when kol<10 then 1 end) as len1, count(...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Portuguese Language

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

Enter Parameters

Options:
Switch to meta site
loading Hold tight while we fetch your results