Skip to main content
Journey Uncommon Logo
JourneyUncommon
mediumSQLself-joinsSingle-choice MCQ

In a self-join over an adjacency list to walk a hierarchy, why does a fixed chain of self-joins fail to return all descendants?

SELECT child.name FROM nodes parent JOIN nodes child ON child.parent_id = parent.id WHERE parent.id = 1;