Tag Archives: GROUP BY

Oracle error: not a group by expression [How to Solve]

Error: not a group by expression

Instance: Select   sum(hwjz),rq from   JcChargeInfo where   1=1    group   by   rq order   by   jcchargecode desc

Reason:

1. When group by and order by are used together, order by should follow group by

2. The field of order by must be followed by group by

3. The fields selected in the select statement to be queried must appear in the group by clause