Question: HW: 1 . 1 4 . Only the Brave: Finding the GPA Gladiators for Scholarships Consider the following relations: Students Enrollments Courses Name Type NetId
HW: Only the Brave: Finding the GPA Gladiators for Scholarships
Consider the following relations:
Students Enrollments Courses
Name Type
NetId VARCHAR
FirstName VARCHAR
LastName VARCHAR
Department VARCHAR
Name Type
NetId VARCHAR
CRN INT
Credits INT
Score REAL
Name Type
CRN INT
Title VARCHAR
Department VARCHAR
Instructor VARCHAR
We want to nominate excellent students for a scholarship, but there is a very limited number of students we can nominate. Therefore, we only want the best of the best students. Students' scores and GPAs obviously matter, but we don't want students who have only been taking easy classes. To find students that fit this criteria, we want students who have taken at least "difficult" courses, and that student's average score across all their classes taken must be at or above the average score of students who took at least "difficult" courses. For a course to be considered "difficult," the difference between the highest and lowest score in the course must be at least inclusive
Write an SQL query that returns, for every student that should be nominated for the scholarship, the student's NetId, LastName and the average Score as AverageScore of this student taken across all courses that the student is enrolled in While calculating the average scores, weight the scores by the credits of the courses. That is AverageScore Sigma Score CreditsSigma Credits Finally, ROUND AverageScore to the nearest digits using a call to ROUND
Return the results in the decreasing order of AverageScore and increasing order of NetId.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
