nerdexam
Oracle

1Z0-007 · Question #74

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 correct answer is C. SELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL GROUP BY semester_end. 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…

Using Functions (Single-Row, Group, Conversion, Conditional)

Question

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?

Options

  • ASELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL;
  • BSELECT (gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;
  • CSELECT MAX(gpa) FROM student_grades WHERE gpa IS NOT NULL GROUP BY semester_end;
  • DSELECT MAX(gpa) GROUP BY semester_end WHERE gpa IS NOT NULL FROM student_grades;
  • ESELECT MAX(gpa) FROM student_grades GROUP BY semester_end WHERE gpa IS NOT NULL;

How the community answered

(51 responses)
  • A
    6% (3)
  • B
    2% (1)
  • C
    75% (38)
  • D
    16% (8)
  • E
    2% (1)

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

Topics

#MAX function#GROUP BY#aggregate functions#SQL clause order

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice