7 lines
285 B
MySQL
7 lines
285 B
MySQL
|
select Students.firstName, max(averageGrade) as maxAverage
|
||
|
from (
|
||
|
select Students.pNbr, TakenCourses.grade, avg(grade) as averageGrade
|
||
|
from Students
|
||
|
join TakenCourses on Students.pNbr = TakenCourses.pNbr
|
||
|
group by Students.pNbr
|
||
|
) as studentAverages
|