Spam posts with upvotes

1

Please login or register to vote for this query.

(click on this box to dismiss)

Programming Language Design and Implementation

Q&A for designers and implementers of computer programming languages

;  with spam_cte as
(SELECT DISTINCT 
  p.Id AS pid,
  DATEDIFF(minute, p.CreationDate, p.DeletionDate) AS Minutes,
  p.CreationDate AS cre,
  p.DeletionDate AS del
FROM PostsWithDeleted p INNER JOIN Votes v ON v.PostId=p.Id
WHERE v.VoteTypeId=##votetype?12## 
AND (p.DeletionDate IS NOT NULL))

SELECT TOP(##num?500##)
  pid AS [Post Link], 
  url = 'site://q/' + CAST(pid AS varchar),
  COUNT(v.Id) AS Upvotes,
  cre AS Created
FROM Votes v INNER JOIN spam_cte s ON s.pid=v.PostId
WHERE v.VoteTypeId=##up?2##
GROUP BY pid, cre
ORDER BY Upvotes DESC

Enter Parameters

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