select count(case when c<10 then 1 end) as first, count(c...

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 c<10 then 1 end) as first,
count(case when c between 10 and 20 then 1 end) as second,
count(case when c >20 then 1 end) as third
from (
select OwnerUserId, count(*) c
from posts
where PostTypeId in 
(select id from PostTypes where name = 'Question')
group by OwnerUserId
) as x

Enter Parameters

Options:
Switch sites:
loading Hold tight while we fetch your results