Tasty and delicious Dupe Loops


Please login or register to vote for this query.

(click on this box to dismiss)

Finds loops of questions closed as duplicates of each other. Returns the oldest question (by question ID) in each loop. This query currently finds loops of up to 20 questions, but is easily extensible.

Stack Overflow

Q&A for professional and enthusiast programmers

With Dupes as (
  Select PostId as Source, RelatedPostId as Target
  From PostLinks
  Where LinkTypeId = 3
  Dupe1.Source as [Post Link]
  Dupes as Dupe1
  Join Dupes as Dupe2 on Dupe1.Target = Dupe2.Source
  Join Dupes as Dupe3 on Dupe2.Target = Dupe3.Source
  Join Dupes as Dupe4 on Dupe3.Target = Dupe4.Source
  Join Dupes as Dupe5 on Dupe4.Target = Dupe5.Source
  Join Dupes as Dupe6 on Dupe5.Target = Dupe6.Source
  Join Dupes as Dupe7 on Dupe6.Target = Dupe7.Source
  Join Dupes as Dupe8 on Dupe7.Target = Dupe8.Source
  Join Dupes as Dupe9 on Dupe8.Target = Dupe9.Source

Enter Parameters

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