Created
July 11, 2012 10:45
-
-
Save bakura10/3089590 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 | |
COUNT(a0_.id) AS sentApplications, | |
SUM(IF(a0_.status = 16, 1, 0)) AS acceptedApplications, | |
SUM(IF(a0_.status = 32 AND m1.`status` = 1, 1, 0)) as finished | |
FROM Applications a0_ | |
JOIN Missions m1 ON a0_.mission_id = m1.id | |
WHERE a0_.student_id = 7 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment