# Oracle SQL error ORA-00979



## Dre0745 (Jun 25, 2004)

Hi, I am trying to run the following script but it always results on the error:
ORA-00979: not a GROUP BY expression.

Script:

SELECT CO.CATEGORY, SUM(EN.FEE_PAID), CO.COURSENAME
FROM COURSE CO, ENROLMENT EN, CLASS CL
WHERE EN.REFERENCENO = CL.REFERENCENO
AND CL.COURSENO = CO.COURSENO
GROUP BY CO.COURSENAME

Thanks for any help!

Dre0745


----------



## Shajahan (Apr 6, 2008)

You have to add all non-Agregate columns in Select list to Group by list.

i.e. Add co.Category in Group by list


----------

