Created
October 17, 2011 19:09
-
-
Save hermansc/1293480 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 sch.id, sch.title, shift.id, shift.begin, shift.end, shift.unwanted as w, u.username | |
FROM shiftmanager_schedule sc | |
JOIN shiftmanager_schedule_shifts sh ON (sc.id = sh.schedule_id) | |
JOIN shiftmanager_shift shift ON (shift.id IN (SELECT temp.shift_id FROM shiftmanager_schedule_shifts temp WHERE temp.schedule_id = sh.id) | |
JOIN aktive_verv ON (av.medlem_id = shift.owner_id) | |
JOIN auth_user u ON (av.medlem_id = u.id) | |
WHERE av.medlem_id = 1012912; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment