When mysql 5.7 first uses group by, an error occurs. First, the table information is as follows:
ERROR 1055 (42000): Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘test.score.id’ which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
select c_name,id from score group by c_name;

Check out the check mode of MySQL5.7

Remove the ONLY_FULL_GROUP_BY item by modifying the my.cnf or my.ini configuration file (created if there is no such configuration item)
add the following line to the file
sql_mode = STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION
Then restart mysql
will not appear ONLY_FULL_GROUP_BY at this time

Error message: analysis: ONLY_FULL_GROUP_BY means: For GROUP BY aggregation operations, if the column in the SELECT does not appear in the GROUP BY, then this SQL is illegal, because the column is not...
Problem Description: ERROR 1055 (42000): Expression # 2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'commodity.a.xsjg' which is not functionally dependent on columns in ...
SQL92 and earlier versions do not allow the selection list,HAVINGConditions orORDER BYIn the list of referencesGROUP BYClause of a query non-grouping columns unnamed. For example, in the SQL92 standar...
Questions raised MySQL data table query statement: Prompt the following error message: The definition of the t_user table is as follows: MySQL information Enter commands on the MySQL command line or c...
ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘mome.a.type’ which is not functionally dependent on columns in GROUP BY clause...
Question: You can't use Group By packet query under Mac, as shown below Workaround: Modify the value of the variable SQL_MODE Specific steps: 1, MAC's mysql configuration file is /library/launchdaemon...
In aggregated query without GROUP BY, expression #1 of SELECT list contains nonaggregated column'szmz_zhbz_gov.b.cremation_time'; this is incompatible with sql_mode=only_full_group_by After reviewing ...
Database query 1055 - Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column ‘dkia_quality_db.b.id’ which is not functionally dependent on columns in GROU...
cause The reason is that in the version of the MySQL database version of 5.7 or more, the only_full_group_by SQL mode is turned on by default. In this mode, if you operate in the group by, if the quer...
During the development process today, because the previous project has been developed and the database migration has been completed, during the operation today, an error occurred when summing up by gr...