Top 10 Duplicated Questions

0

Please login or register to vote for this query.

(click on this box to dismiss)

Stack Overflow

Q&A for professional and enthusiast programmers

SELECT TOP 10
  pl.RelatedPostId AS [PostId],
  CONCAT('site://q/', pl.RelatedPostId, '|', CASE 
    WHEN pwd.DeletionDate IS NULL
    THEN pwd.Title
    ELSE '[deleted]'
    END
  ) AS [Target Post],
  COUNT(*) AS [Dupe Count],
  pwd.Tags,
  pwd.CreationDate AS [Target Posted Date]
FROM PostLinks pl
JOIN PostsWithDeleted pwd ON pwd.Id = pl.RelatedPostId
WHERE LinkTypeId = 3 -- Dupe Type Code
GROUP BY pl.RelatedPostId, pwd.DeletionDate, pwd.Title, pwd.Tags, pwd.CreationDate
ORDER BY COUNT(*) DESC, pwd.CreationDate DESC

Enter Parameters

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