SELECT DISTINCT TOP 10 Users.ID FROM Users JOIN POSTS ON ...

0

Please login or register to vote for this query.

(click on this box to dismiss)

Vegetarianism

Q&A for those committed to a vegan or vegetarian lifestyle and anyone interested in learning more

SELECT DISTINCT TOP 10 Users.ID FROM Users
JOIN POSTS ON (POSTS.OwnerUserId=Users.id)
WHERE
(SELECT COUNT(*) FROM POSTS
WHERE POSTS.OwnerUserId=Users.id
AND POSTS.PostTypeId=1
AND (POSTS.CreationDate BETWEEN '2015-01-01' AND '2015-12-31'))=0

AND

(SELECT COUNT(*) FROM POSTS
WHERE POSTS.OwnerUserId=Users.id
AND POSTS.PostTypeID=2
AND (POSTS.CreationDate BETWEEN '2014-01-01' AND '2014-12-31'))>0

Enter Parameters

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