select count(*) from Users, Posts where Users.Id = Posts....

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

select count(*)
  from Users, Posts
  where Users.Id = Posts.OwnerUserId and Users.Location = 'Russia' and (Posts.PostTypeId = 1 OR Posts.PostTypeId = 2)
group by Posts.PostTypeId
having count(case when Posts.PostTypeId = 1 then 1 else null end) = 0 OR
  count(case when Posts.PostTypeId = 2 then 1 else null end) = 0;

Enter Parameters

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