select sum(case when Users_Post_Counter.Count < 10 then 1...

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 sum(case when Users_Post_Counter.Count < 10 then 1 else 0 end),       sum(case when Users_Post_Counter.Count between 10 and 20 then 1 else 0 end),       sum(case when Users_Post_Counter.Count > 20 then 1 else 0 end)from (select ( select count(*)   from Posts    where Posts.OwnerUserId= Users.Id)as Count from Users) 
 as Users_Post_Counter;

Enter Parameters

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