Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘a_id’ which is not functionally
dependent on columns in GROUP BY clause;this is incompatible with sql_mode=only_full_group_by
Solution:
Firstly Use SQL to find:
select @@global.sql_mode
Remove only_FULL_GROUP_By, and then reset the value (fill in the cropped string in quotation marks)
set @@global.sql_mode='';
The values you find is the below:
ONLY_FULL_GROUP_BY,STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Similar Posts:
- SELECT list is not in GROUP BY clause and contains nonaggregated
- [Solved] MYSQL Command gruop by Error: this is incompatible with sql_mode=only_full_group_by
- SELECT list is not in GROUP BY clause and contains nonaggregated column
- [Solved] SELECT list is not in GROUP BY clause and contains nonaggregated
- [Solved] MYSQL8 group by Error: Cause: java.sql.SQLSyntaxErrorException: Expression #1 of SELECT list is not in GROUP BY
- Solve the problem of grouping error expression #1 of select list is not in group for MySQL greater than version 5.7
- Expression #1 of ORDER BY clause is not in SELECT list, references column ‘xxxx’ which is not in SELECT list; this is incompatible with DISTINCT
- MySQL Error: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column
- Laravel uses group by to report errors [How to Solve]
- MYSQL Insert: SQLSTATE[HY000]: General error: 1364 Field ‘xxxxx’ doesn’t have a default value