Skip to content

Instantly share code, notes, and snippets.

@guedes
Created May 5, 2011 16:44
Show Gist options
  • Save guedes/957394 to your computer and use it in GitHub Desktop.
Save guedes/957394 to your computer and use it in GitHub Desktop.
SQL example for JOIN tables and subqueries
SELECT name,age
FROM person
join (SELECT max(age) as age FROM person) as max_age USING (age);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment