MySQL GROUP BY statement, the GROUP BY statement groups the result set based on one or more columns. On the grouped columns we can use functions such as COUNT, SUM, AVG, etc.
For a group by column, if you query multiple columns, execute the SQL statement, and the error will be reported as follows:
SQL Error [1055] [42000]: Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'itsvse' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
ONLY_FULL_GROUP_BY:
For GROUP BY aggregation operations, if the columns in SELECT do not appear in GROUP BY, then this SQL is considered illegal because the columns are not in the GROUP BY clause
Set Allow SELECT columns without GROUP BY
Query sql_mode
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 Query your matching value and remove the "ONLY_FULL_GROUP_BY" (Don't just copy mine through below)
(End)
|