QuestionQ198

VerifiedRestricting and sorting data

Review the definition of the EMPLOYEES table:

Question Image

Which two queries return the highest salary in the table?

Choose two
Explanation

MAX(salary) over all rows returns the highest salary in the table. Oracle also supports nested aggregate functions: MAX(MAX(salary)) with GROUP BY department_id takes each department’s maximum salary and returns the greatest of those departmental maxima, which is the table-wide highest salary.

Learn more

Community Discussion

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