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:
- Error: not a group by expression [How to Solve]
- Oracle error: not a group by expression [How to Solve]
- [Solved] MYSQL Command gruop by Error: this is incompatible with sql_mode=only_full_group_by
- [Solved] must appear in the GROUP BY clause or be used in an aggregate function
- Usage of within group in Oracle
- Mysql Error: 1140 – In aggregated query without GROUP BY, expression #2 of SELECT list contains nonaggregated column ‘a.store’; this is incompatible with sql_mode=only_full_group_by
- How to solve Oracle ora-00937 Error: not a single group grouping function?
- Hive SemanticException:Expression not in GROUP BY
- MYSQL Error: Invalid use of group function [How to Solve]
- [Solved] SELECT list is not in GROUP BY clause and contains nonaggregated