Created
August 29, 2012 07:31
-
-
Save donovan-duplessis/3507991 to your computer and use it in GitHub Desktop.
Consultant Reports
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 Team.name, User.name, CR.week, CR.id, Team.id, User.id | |
FROM consultant_reports as CR | |
JOIN teams AS Team ON (CR.team_id = Team.id) | |
JOIN admin_users AS User ON (CR.admin_user_id = User.id) | |
WHERE CR.month = %s | |
%s | |
GROUP BY Team.name, User.name, CR.week | |
ORDER BY Team.name, User.name, CR.week; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment