QuestionQ201

VerifiedManipulating Data

Examine the definition of the EMPLOYEES table:

Question Image

Which query is valid?

Explanation

When a query uses GROUP BY, each selected item must be either a grouping expression, an aggregate expression, or a constant. Grouping by both DEPT_ID and JOIN_DATE permits those columns to appear with SUM(SALARY). Oracle does not allow nested group functions in the same query block. Oracle Database SQL Language Reference: SELECT

Learn more

Community Discussion

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