Last active
April 22, 2016 05:14
-
-
Save mathie/c3447a0a6afc695f851ae9a8360c2ef2 to your computer and use it in GitHub Desktop.
Let’s say we wanted to find out which room a computer was in...
This file contains hidden or 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 buildings.name building, floors.name floor, rooms.name room | |
FROM computers, locations buildings, locations floors, locations rooms | |
WHERE computers.name = ‘Arabica’ | |
AND computers.room_id = rooms.id | |
AND rooms.location_id = floors.id | |
AND floors.location_id = buildings.id |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment