select count(case when cn<10 then 1 end) as less_10, coun...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Literature Meta

Q&A about the site for scholars and enthusiasts of literature

select  
count(case when cn<10 then 1 end) as less_10,  
count(case when (cn>=10 and cn<=20) then 1 end) as large_10_and_less_20, 
count(case when cn>20 then 1 end) as large_20 
from ( 
select owneruserid, count(*) cn 
from posts  
where posttypeid = ( 
select id from posttypes where name = 'Question' 
) 
group by owneruserid 
) as x

Enter Parameters

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