Duplicates of newer originals

0

Please login or register to vote for this query.

(click on this box to dismiss)

Science Fiction and Fantasy Meta

Q&A about the site for science fiction and fantasy enthusiasts

SELECT d.Id AS [Post Link], d.CreationDate AS 'Duplicated posted on',
  o.Id AS [Post Link], o.CreationDate AS 'Original posted on',
  DATEDIFF(DAY, d.CreationDate, o.CreationDate) AS 'Difference (days)'
  FROM PostLinks AS pl
  INNER JOIN Posts AS d
    ON pl.PostId = d.Id
  INNER JOIN Posts AS o
    ON pl.RelatedPostId = o.Id
   AND o.CreationDate > d.CreationDate
  WHERE pl.LinkTypeId = 3 -- Duplicate
  ORDER BY 5 DESC

Enter Parameters

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