Posts that are the target of the most duplicate closures

2

Please login or register to vote for this query.

(click on this box to dismiss)

Ask Ubuntu

Q&A for Ubuntu users and developers

-- Some deleted posts still live in PostLinks.RelatedPostId because they are the
-- closure target of a non-deleted post. I've excluded those from the query below.

SELECT
  pl.PostId,
  pl.RelatedPostId
FROM
  PostLinks AS pl
WHERE
  pl.LinkTypeId = 3 -- duplicate
  AND pl.RelatedPostId IN (SELECT p.Id FROM Posts AS p)

Enter Parameters

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