In Oracle Library: all fields except aggregate function queried after select must be added after group by
Solution: put group by into the sub query or put all query fields after select into group by
Error: not 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:
- Oracle error: not a group by expression [How to Solve]
- Oracle 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] must appear in the GROUP BY clause or be used in an aggregate function
- [Solved] must appear in the GROUP BY clause or be used in an aggregate function
- [Solved] MYSQL Command gruop by Error: this is incompatible with sql_mode=only_full_group_by
- Laravel uses group by to report errors [How to Solve]
- [Solved] Search with xadmin_ Related field got invalid lookup: icontains
- [Solved] Django use search_fields error (in get_lookup_constraint)