Oracle error: not a single group grouping function

Error: not a single group grouping function

Instance: Select   sum(HWJZ)  , rq from    JcChargeInfo

 

Reason:

1. If a grouping function is used in the program, there are two situations:

Group by exists in the program, and the grouping conditions are specified, so the grouping conditions can be queried together  

Replace with:

select   sum(HWJZ)  , rq from    JcChargeInfo   group   by   rq

If you do not use grouped activities, you can only use grouped functions alone

Replace with:

select   sum(HWJZ)    from    JcChargeInfo

2,   When using grouping functions, fields other than grouping conditions cannot appear

Summary: the fields selected in the select statement to be queried must appear in the group by clause

Similar Posts: