Which statement finds the highest grade point average (…

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?

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:
A:
per semester condition is not included
B:
result would not display the highest gpa value
D:
invalid syntax error
E:
invalid syntax error
Refer: Introduction to Oracle9i: SQL, Oracle University Study Guide, 5-7



Leave a Reply 0

Your email address will not be published. Required fields are marked *