Lists the top 100 most duplicated posts (posts which have been closed as a duplicate of the given post).
Q&A for meta-discussion of the Stack Exchange family of Q&A websites
SELECT TOP 100 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], CONCAT('https://data.stackexchange.com/stackoverflow/query/1430005/duplicates-for-post?OriginalPostId=', pwd.Id, '|All Dupes') AS [Link to List of All Duplicates] 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, pwd.Id ORDER BY COUNT(*) DESC, pwd.CreationDate DESC