Created
August 17, 2014 15:35
-
-
Save dirn/ee510d5beffa210f662c to your computer and use it in GitHub Desktop.
PyGotham room schedule
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 | |
TO_CHAR(s.start, 'HH12:MIAM') AS start, | |
TO_CHAR(s.end, 'HH12:MIAM') AS end, | |
u.name, | |
t.name | |
FROM | |
rooms r | |
JOIN rooms_slots rs ON r.id = rs.room_id | |
JOIN slots s ON rs.slot_id = s.id | |
JOIN presentations p ON s.id = p.slot_id | |
JOIN talks t ON p.talk_id = t.id | |
JOIN users u ON t.user_id = u.id | |
JOIN days d ON s.day_id = d.id | |
WHERE d.id = 1 | |
AND r.id = 1 | |
ORDER BY | |
r.order, | |
s.start; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment