Old Closed Questions with No Delete Votes

2

Please login or register to vote for this query.

(click on this box to dismiss)

Questions more than ##years## old which have no delete votes - they may be waiting for their very first delete vote, to put them on the 10k delete list "radar". Oldest first.

Emacs

Q&A for those using, extending or developing Emacs

;
WITH OLDCLOSED AS
(
  SELECT *
  FROM Posts AS p
  WHERE p.CreationDate < DATEADD(YY, -##years##, GETDATE())
      AND p.ClosedDate IS NOT NULL
      AND p.AnswerCount = 0
      AND p.PostTypeId = 1
),
MERGEDPOSTS AS
(
  SELECT o.Id
  FROM OLDCLOSED AS o
  INNER JOIN PostHistory AS ph ON o.Id = ph.PostId
  WHERE ph.PostHistoryTypeId = 37
),
DELETEVOTES AS
(
  SELECT *
  FROM Votes AS v
  WHERE v.VoteTypeId=10
)
SELECT top 200 
    o.id as [Post Link]--, vt.Name
FROM OLDCLOSED AS o
--INNER JOIN Votes AS xv ON o.Id = xv.PostID
--INNER JOIN VoteTypes AS vt ON xv.VoteTypeId = vt.Id
LEFT OUTER JOIN DELETEVOTES AS v ON v.PostId = o.Id
--LEFT OUTER JOIN VoteTypes AS vt ON v.VoteTypeId = vt.Id
LEFT OUTER JOIN MERGEDPOSTS AS ph ON o.Id = ph.Id
WHERE v.Id IS NULL AND ph.Id IS NULL
ORDER BY O.CreationDate;--, xv.CreationDate;

Enter Parameters

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