Created
October 15, 2015 22:01
-
-
Save clintonb/d943be4f6daa401e0613 to your computer and use it in GitHub Desktop.
Queries for answering credit-related questions
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
-- Number of students who have submitted credit requests, | |
-- grouped by course and status. | |
SELECT | |
co.course_key | |
, cr.status | |
, COUNT(1) AS 'count' | |
FROM | |
credit_creditrequest cr | |
JOIN credit_creditcourse co ON cr.course_id = co.id | |
GROUP BY | |
co.course_key | |
, cr.status; | |
-- Number of students eligible for credit, grouped by course | |
SELECT | |
co.course_key | |
, COUNT(1) AS 'count' | |
FROM | |
credit_crediteligibility ce | |
JOIN credit_creditcourse co ON ce.course_id = co.id | |
GROUP BY | |
co.course_key; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment