MySQL Error 1055 (42000): Expression not in GROUP BY (ONLY_FULL_GROUP_BY)
Strict SQL mode rejected non-deterministic unaggregated columns in SELECT.
Runs locally in browser
Free · No login
Independently Verified 2026-11-25
v4.1.0
Identifier: MySQL Error 1055 (42000)
Platform: MySQL
Common Root Causes:
- Strict SQL mode rejected non-deterministic unaggregated columns in SELECT.
Interactive Diagnostic Checklist
Verified Solutions:
- Wrap non-grouped columns in `ANY_VALUE()` or explicit aggregates instead of disabling strict mode.
Safe Diagnostic Command:
SELECT @@sql_mode;
Warning: Verify configuration changes in staging or with dry-run flags (e.g. nginx -t) before reloading production services.
Technical Explanation
Strict SQL mode rejected non-deterministic unaggregated columns in SELECT. Recommended diagnostic: `SELECT @@sql_mode;`. Remediation: Wrap non-grouped columns in `ANY_VALUE()` or explicit aggregates instead of disabling strict mode.
Worked Examples
- Run `SELECT @@sql_mode;` to verify root cause before applying the remediation.
Limitations & Assumptions
- Always verify configuration changes in staging or with dry-run flags (e.g. `nginx -t`) before reloading production services.
Source References & Verification
Resource ID: err-mysql-1055-only-full-group-by · Independently verified: 2026-11-25