Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT id, parent_id, name
- FROM nodes
- WHERE parent_id IN (SELECT descendant FROM closures GROUP BY descendant);
- -- wtf:
- -- there is only one row in closures
- -- it's descendant id is 5
- -- none of the rows returned by this query have a parent_id of 5
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement