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
Similar Posts:
- Error: not a group by expression [How to Solve]
- Oracle error: not a single group grouping function
- Hive SemanticException:Expression not in GROUP BY
- [Solved] must appear in the GROUP BY clause or be used in an aggregate function
- [Err] 1055 – Expression #1 of ORDER BY clause is not in GROUP BY clause and contains nonaggregated c
- [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
- [Solved] MySQL Error: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre
- SELECT list is not in GROUP BY clause and contains nonaggregated column
- MYSQL Error: Invalid use of group function [How to Solve]