select count (Id) as result from ( select u.Id ,count(Own...

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 (Id) as result from (
select u.Id ,count(OwnerUserId) as
posts_count from Posts p join Users u
on p.OwnerUserId = u.Id where p.PostTypeId = 1 group by u.Id) r where
posts_count < 10
union
select count(Id) as result from (
select u.Id ,count(OwnerUserId) as
posts_count from Posts p join Users u
on p.OwnerUserId = u.Id where p.PostTypeId = 1 group by u.Id) r where
posts_count >= 10 and posts_count < 20
union
select count(Id) as result from (
select u.Id ,count(OwnerUserId) as
posts_count from Posts p join Users u
on p.OwnerUserId = u.Id where p.PostTypeId = 1 group by u.Id) r where
posts_count > 20

Enter Parameters

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