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)

Audio-Video Production Meta

Q&A about the site for engineers, producers, editors, and enthusiasts spanning the fields of video, and media creation

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 main site
loading Hold tight while we fetch your results