select count(*)- (select count(distinct owneruserid) from...

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(*)- 
(select count(distinct owneruserid) from posts 
where creationdate >= '2018-01-01' 
and creationdate < '2019-01-01' and posttypeid = 1 and owneruserid is not null) from users where year(users.creationdate) < 2019; 



/*select count(*)
  from users where id not in (select owneruserid from posts
  where year(creationdate) = 2018 and posttypeid = 1 and
  owneruserid is not null) and year(creationdate) < 2019;*/

Enter Parameters

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