QuestionQ286

VerifiedReporting Aggregated Data Using the Group Functions

The STUDENT_GRADES table contains these columns:

  • STUDENT_ID NUMBER(12)
  • SEMESTER_END DATE -
  • GPA NUMBER(4, 3)

Which statement returns the highest grade point average (GPA) for each semester?

Explanation

MAX(gpa) calculates the greatest non-null GPA within each group, and GROUP BY semester_end creates one group for every semester. A WHERE gpa IS NOT NULL filter is valid before GROUP BY; although MAX ignores nulls, the predicate is syntactically valid and meets the requirement.

Community Discussion

No comments yet. Be the first to start the discussion!