QuestionQ15

VerifiedRetrieving data using the SQL SELECT statement

Review the following data in the EMPLOYEES table:

Question Image

Which statement executes successfully?

Explanation

With GROUP BY dept_id, each selected item must be a grouping expression, an aggregate function, a constant, or an expression derived from those. MAX(last_name) and SUM(salary) are aggregate functions, while dept_id is the grouping column. Oracle documents this rule for select lists that contain a GROUP BY clause.

Learn more

Community Discussion

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