The STUDENT_GRADES table has these columns:
STUDENT_ID NUMBER(12)
SEMESTER_END DATE
GPA NUMBER(4,3)
Which statement finds the highest grade point average (GPA) per semester?
A.
SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL;
B.
SELECT (gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;
C.
SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL GROUP BY
semester_end;
D.
SELECT MAX(gpa) GROUP BY semester_end WHERE gpa IS NOT NULL FROM
student_grades;
E.
SELECT MAX(gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT
NULL;
Explanation:
For highest gpa value MAX function is needed, for result with per semester GROUP BY clause is
needed
Incorrect answer:
Aper semester condition is not included
Bresult would not display the highest gpa value
Dinvalid syntax error
Einvalid syntax error
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 5-7
The A is the aswer too
wrong it say per semester 🙁 sorry
Sorry ,
Without a GROUP BY it will return MAX value for whole table
Regards,