Questions escaping from auto-deletion due to OWN comments


Please login or register to vote for this query.

(click on this box to dismiss)

Questions escaping from RemoveAbandonedQuestions script ( due to your OWN comments. If a question has only two comments, deleting yours will make it to be purged. If it is a question that does not deserve to be purged, then edit it, upvote it, and if possible, answer it.

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT p.Id AS [Post Link],
FROM Posts p
INNER JOIN Comments c ON c.PostId = p.Id
WHERE p.PostTypeId = 1 -- questions.
      AND p.CreationDate < GETDATE() - 365 -- older than 365 days.
      AND (
          (p.OwnerUserId IS NULL AND p.Score < 2) -- questions with deleted owners
          (p.OwnerUserId IS NOT NULL AND p.Score < 1)
      AND p.AnswerCount = 0
       SELECT *
       FROM PostHistory ph
       WHERE ph.PostId = p.Id
       AND ph.PostHistoryTypeId = 14 -- not locked
      AND p.ViewCount <= DATEDIFF(DAY, p.CreationDate, GETDATE()) * 1.5
      AND p.CommentCount > 1
      AND c.UserId = p.OwnerUserId
ORDER BY p.CommentCount ASC; -- posts with 2 comments first (if UserID's comment is deleted, the Q is purged).

Enter Parameters

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