QuestionQ179

VerifiedRestricting and Sorting Data

The STUDENT_GRADES table contains these columns:

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

The registrar has requested a report that lists students’ grade point averages (GPA) ordered from the highest grade point average to the lowest.

Which statement generates a report that displays the student ID and GPA in the order requested by the registrar?

Explanation

ORDER BY gpa DESC orders the numeric GPA values in descending order, placing the highest GPAs first. Oracle SQL uses DESC to specify descending sort order; omitting the direction defaults to ascending order.

Learn more

Community Discussion

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