Deleted spam/offensive posts

2

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for programmers

SELECT 
  'site://revisions/'+cast(p.Id as nvarchar)+'/1' AS [Revisions Link], 
  p.Id AS [Post ID],
  COUNT(CASE WHEN v.VoteTypeId = 4 THEN 1 ELSE NULL END) Offensive,
  COUNT(CASE WHEN v.VoteTypeId = 12 THEN 1 ELSE NULL END) Spam,
  p.CreationDate,
  p.DeletionDate
FROM PostsWithDeleted p
INNER JOIN Votes v ON v.PostId = p.Id 
WHERE v.VoteTypeId IN (4,12) AND p.DeletionDate IS NOT NULL
GROUP BY p.Id, p.CreationDate, p.DeletionDate
ORDER BY p.DeletionDate DESC

Enter Parameters

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