This query aims to identify borderline questions to the RemoveAbandonedClosed script described in https://meta.stackexchange.com/help/roomba. All criteria are met except score from question and/or answers(s) which are one vote off from automatic deletion. On the other hand, if question is on-topic, vote/flag to reopen it; if it has good/valid answers, then vote for them.
Q&A for professional and enthusiast programmers
SELECT q.Id AS [Post Link]
FROM Posts q
INNER JOIN PostHistory ph ON ph.PostId = q.Id
q.ClosedDate < GETDATE() - 9 -- closed more than 9 days ago
AND ph.PostHistoryTypeId = 10 AND ph.Comment NOT IN ('1', '101') -- not duplicate
AND NOT EXISTS
FROM PostHistory ph
WHERE ph.PostId = q.Id
AND ph.PostHistoryTypeId = 14) -- not locked.
AND q.Score <= 1
AND(SELECT COUNT(*) FROM Posts a WHERE a.ParentId = q.Id and a.Score > 1) = 0
AND q.AcceptedAnswerId IS NULL
AND q.LastEditDate < GETDATE() - 9 -- not edited in the last 9 days
ORDER BY q.CreationDate -- oldest post first.