I wrote a query that does this that's a little bit more robust than the original: Duplicates for [Post]
It returns all posts linked as a duplicate for the given post, with posted date and linked/ dupe-close date listed for each.
The dupe target post is listed first, and all subsequent posts are listed thereafter, sorted by post date (with the most recent first).
Like the other query, it requires the target post's ID to pull this information.
Here's the query:
SELECT -- Pull target post
'Target:' AS [#####],
CONCAT('site://q/', pwd.Id, '|', CASE -- Link post, show '[deleted]' if post is deleted
WHEN pwd.DeletionDate IS NULL
THEN pwd.Title
ELSE '[deleted]'
END
) AS [Post],
pwd.CreationDate AS [Date Posted],
NULL AS [Date Linked]
FROM PostsWithDeleted pwd
WHERE pwd.Id = ##OriginalPostId:int##
UNION ALL
SELECT -- Pull all dupe posts using PostLinks table
'' AS [#####],
CONCAT('site://q/', pl.PostId, '|', CASE
WHEN pwd.DeletionDate IS NULL
THEN pwd.Title
ELSE '[deleted]'
END
) AS [Post],
pwd.CreationDate AS [Date Posted],
pl.CreationDate AS [Date Linked]
FROM PostLinks pl
JOIN PostsWithDeleted pwd ON pwd.Id = pl.PostId
WHERE RelatedPostId = ##OriginalPostId:int##
AND LinkTypeId = 3 -- Link type for Duplicates
ORDER BY [#####] DESC, [Date Posted] DESC
Bonus, related query: 100 Most Duplicated Posts on [Site]