The principle of group by is
First divide the data into groups according to the grouping field,
Then perform specific aggregation operations in each group
The limitations of ONLY_FULL_GROUP_BY mode are:
SELECT list is not in GROUP BY clause and contains nonaggregated column
In the columns of the select query, there are fields that are not in the group by clause, and there are fields that are not aggregate functions
The reason is that:
After group by, all fields and attributes are the attributes of this group
Among the attributes of a group, only if the maximum/minimum/average/total is known, this aggregated attribute is meaningful
The attributes of each individual group member are meaningless
That’s why this restriction appears
Read More:
- [Solved] ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregate
- [Solved] MySQL Error: “Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggre”
- [Solved] Sequelize DatabaseError: ER_WRONG_FIELD_WITH_GROUP: Expression #2 of SELECT list is not in GROUP
- postgresql-Database query problem-ERROR: column “t.domainid“ must appear in the GROUP BY clause or be used in an a
- MYSQL gruop by Error: this is incompatible with sql_mode=only_full_group_by
- How to Solve MySQL version 5.7+ Group by group error
- [Solved] MYSQL 5.7 gruop by eRROR: this is incompatible with sql_mode=only_full_group_by
- SQL Server Group sort de duplication row_ number() over ( PARTITION BY t1.col_ 2 ORDER BY 1 )
- [Two Methods] Ora-00904: invalid group by error identifier
- [Solved] MySQL Error: ERROR 1055 (42000)sql_mode=only_full_group_by
- [Solved] MYSQL Start Project Error: this is incompatible with sql_mode=only_full_group_by
- Mysql :error 1111. Invalid use of group function
- [Solved] MySQL: Syntax error or access violation: 1055 Expression #1 of SELECT list is not …
- View’s select contains a subquery in the from clause bug
- [Solved] Daily further: database error: unknown column ‘model’ in ‘field list‘
- ERROR 1054(42S22) Unknown column ‘password’ in ‘field list’ (Fixed)
- [Solved] ERROR 1054 (42S22): Unknown column ‘password‘ in ‘field list‘
- mysql workbench Error Code: 1046. No database selected Select the default DB to be used by doubl
- Caused by: java.sql.SQLTransientConnectionException: HikariPool-1 – Connection is not available, request timed out after 30005ms.
- [Solved] pymysql.err.internalError: (1054, “Unknown column ‘LGD_xiaohong’ in ‘field list’”)