Skip to content

Instantly share code, notes, and snippets.

@mgp
Created August 17, 2015 15:45
Show Gist options
  • Save mgp/957ce689937ea4d4a135 to your computer and use it in GitHub Desktop.
Save mgp/957ce689937ea4d4a135 to your computer and use it in GitHub Desktop.
select GrandParentLevel.parent_id as parent_id, ParentLevel.child_id as child_id
from NodeToNode as ParentLevel
inner join NodeToNode as GrandParentLevel
on ParentLevel.parent_id = GrandParentLevel.child_id
where ParentLevel.child_id = 752;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment