Instructions:Put your SQL in the "Problem 4"


Put your SQL in the "Problem 4" location in the SQL template.

Put your row count in the green box in cell D5.

You want to see how your various students are doing, GPA-wise.  Create a report which will give the student’s last name, student’s first name (should be concatenated into a single field as in the example), the student’s major, and the student’s average GPA.  

Include only students who have actually taken at least one class (if they took it and earned 0 GPA points indicating they failed it, that record should be included.)  Do not include a student who has not taken any classes. 

The average GPA is the average of the GPA Points column in the enrollment table; display this to four or more decimal places.  Sort alphabetically by “Last, First” name combination.

Paste a screen shot of successful execution below.  Be sure your screenshots show all the SQL you use; you are welcome to include several screen shots if necessary.

For example, if your input data is like this: (note the in the last row – indicates student Tyrone Brown is new and has not taken any classes yet, has only declared a major.)

Need customized help? Order now
user img


12-09-20 | 11:23:00

select concat(stdLastName,'',stdFirstName) as student_name,stdMajor as major,
Format(avg(GPAPoints),4) as average_gpa
FROM student JOIN enrollment
ON student.idstudent = enrollment.Student_idStudent
where offering_idoffering>=1
group by student_name
order by student_name asc;

Related Question