Skip to content
Advertisement

Unsure of what to put in the GROUP BY statement

I have the following code

However I am unsure what to put in the group by clause as I am receiving this error.

ORA-00979: not a GROUP BY expression 00979. 00000 – “not a GROUP BY expression” *Cause:
*Action:

In the group by , do you have to put the calculation and casts etc.

Any help appreciated

Advertisement

Answer

Since it doesn’t look like you are using any aggregate functions in your query and you are just trying to remove duplicate records, I would remove the group by and just do SELECT DISTINCT... to keep the query a bit simpler.

User contributions licensed under: CC BY-SA
1 People found this is helpful
Advertisement