Find duplicates of deleted posts.

0

Please login or register to vote for this query.

(click on this box to dismiss)

This includes information such as view count, score, answer count, comment count, and its locked status to give an indication as to why it hasn't been deleted by the roomba yet. These questions may need additional help getting deleted, or it may be that their target really should be undeleted.

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT
  P.Id as [Post Link],
  P.ViewCount,
  P.Score,
  P.AnswerCount,
  P.CommentCount as comments,
  P.ClosedDate,
  case ( select count(1)
    from PostHistory PH
    where ph.PostHistoryTypeId in (14, 18) and PH.PostId = P.id)
   when 0 then ''
   when 1 then 'Locked'
  end as locked
FROM
  PostLinks PL
  join Posts P on (PL.PostId = P.id)
WHERE
  PL.LinkTypeId = 3
  AND (SELECT
     Posts.Id
   FROM
     Posts
   WHERE
     Posts.Id = PL.PostId
     ) IS NOT NULL
  AND (SELECT
     Posts.Id
   FROM
     Posts
   WHERE
     Posts.Id = PL.RelatedPostId
     ) IS NULL
GROUP BY P.Id, P.ViewCount, P.Score, P.AnswerCount,
    P.ClosedDate, P.CommentCount
ORDER BY P.ViewCount

Enter Parameters

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