SELECT Deletion = MIN(YEAR(PostNotices.DeletionDate)), Po...

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
Deletion = MIN(YEAR(PostNotices.DeletionDate)), PostNotices.OwnerUserId, PostNotices.DeletionUserId, PostTypeId
FROM 
PostNotices, Posts
WHERE 
PostNotices.PostId = Posts.Id
AND YEAR(PostNotices.DeletionDate) IS NOT NULL
AND DeletionUserId in (-1)
AND PostTypeId = 1
GROUP BY 
PostNotices.OwnerUserId, PostNotices.DeletionUserId, PostTypeId
HAVING
PostNotices.OwnerUserId %2 = 0 AND PostNotices.OwnerUserId not in (1288, 106224, 16587, 3279, 
19679,
1228,
105971,
584192,
871050,
102937,
59303,
237838,
13531,
229044,
366904,
563532,
707111,
50776,
50049,
811,
426671,
2598,
246246,
189134,
100297,
168175,
419)

ORDER BY
PostNotices.OwnerUserId

Enter Parameters

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