ORA-00979: not a GROUP BY expression
Cause: The GROUP BY
clause does not contain all the expressions in the SELECT
clause. SELECT
expressions that are not included in a group function, such as AVG
, COUNT
, MAX
, MIN
, SUM
, STDDEV
, or VARIANCE
, must be listed in the GROUP BY
clause.
Action: Include in the GROUP BY
clause all SELECT
expressions that are not group function arguments.