Skip to content

Instantly share code, notes, and snippets.

@toyeiei
Created November 8, 2018 02:24
Show Gist options
  • Save toyeiei/42efdf6cd2b3256d8ea935c5bdf018ef to your computer and use it in GitHub Desktop.
Save toyeiei/42efdf6cd2b3256d8ea935c5bdf018ef to your computer and use it in GitHub Desktop.
SQL for Beginner - JOIN more than two tables
-- JOIN more than two tables
SELECT
artists.name,
albums.title,
tracks.name
FROM artists
JOIN albums
ON artists.artistid = albums.artistid
JOIN tracks
ON tracks.albumid = albums.albumid
WHERE artists.name = 'Aerosmith';
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment