Question: Progress: 8 1 . 8 2 % Query: 0 9 Total Credits per Course Solution dataset SQL: SELECT Courses.courseName, SUM ( Courses . credits *

Progress: 81.82%
Query: 09 Total Credits per Course
Solution dataset
SQL: SELECT Courses.courseName, SUM(Courses.credits * Enrolls.enrollkey) AS Total_credits
Expected column names:
FROM Courses, Sections, Enrolls courseName, AS Total credits
WHERE Courses.courseKey = Sections.courseKey
AND Enrolls.sectionKey = Sections.sectionKey
GROUP BY Courses.courseName
For reference, here is a list of all ORDER BY Total_credits DESC; tables and attributes:
Courses: courseKey, courseName, department, credits
Enrolls: enrollKey, sectionKey,
List the total credits awarded for each course (credit hours for the course multiplied by COUNT of enrollkey). Order by total credits descending.
Feedback for this query:
Too few parameters. Expected 1.
Note, when the error message gives you an indication of 'too few parameters' it typically indicates that you have included an attribute (or table name) in your SQL that does not exist in your dataset. You should always verify the names of attributes/tables when getting this type of error.
Overall assignment feedback:
Finished? Submit the assignment
The following 2 queries need to be addressed:
09 Total Credits per Course
10 Courses by Gender
Progress: 8 1 . 8 2 % Query: 0 9 Total Credits

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!