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?

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
GROUP BY semester_end;

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;

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

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

Explanation:

:
for highest gpa value MAX function is needed,

for result with per semester GROUP BY clause is needed
Incorrect answer :
* per semester condition is not included
* 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 1

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