Created
February 2, 2009 17:11
-
-
Save johnboxall/56984 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT person.id, person.name, person.parent_id | |
FROM person | |
INNER JOIN person T2 ON (person.parent_id = T2.id) | |
INNER JOIN person T3 ON (T2.parent_id = T3.id) WHERE T3.name = "Grandpa" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment