Multiple choice

The STUDENT_GRADES table has the following columns:

STUDENT_ID NUMBER (12)

SEMESTER_END DATE

GPA NUMBER (4, 3)

Which of the following statements finds the highest Grade Point Average (GPA) per semester?

  1. SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL;

  2. SELECT (gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;

  3. SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL GROUP BY semester_end;

  4. SELECT MAX(gpa) GROUP BY semester_end WHERE gpa IS NOT NULL FROM student_grades;

  5. SELECT MAX(gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;

Reveal answer Fill a bubble to check yourself
C Correct answer
Explanation

The correct query uses GROUP BY semester_end to group records by semester, then MAX(gpa) finds the highest GPA within each group. The WHERE clause filters out NULL values before grouping. Option A lacks GROUP BY and returns only one overall maximum. Option B has incorrect syntax (WHERE after GROUP BY). Options D and E have incorrect clause ordering (GROUP BY and WHERE positions are swapped).