Error map

1055 ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column — incompatible with sql_mode=only_full_group_by

MySQL · layer 5, Data

Open the full error page →

Centre: this error. First ring: errors it is linked with (7). Outer ring: what those are linked with. Colours show the layer of a request each error belongs to. Click any dot to re-centre the map on it; hover to follow its connections. The centre dot opens the error page.

1055 — ERROR 1055 (42000): Expression #1 of SELECT list is not in GROUP BY clause and contains nonaggregated column — incompatible with sql_mode=only_full_group_by (MySQL)10551064 — MySQL ERROR 1064 (42000): You have an error in your SQL syntax (MySQL)10648120 — SQL Server Msg 8120: Column is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause (SQL)81201005 — MySQL ERROR 1005 (HY000): Can't create table (errno: 150 "Foreign key constraint is incorrectly formed") (MySQL)10051054 — MySQL ERROR 1054 (42S22): Unknown column in 'field list' (MySQL)1054ORA-00979 — ORA-00979: not a GROUP BY expression (SQL)ORA-009791007 — MySQL ERROR 1007 (HY000): Can't create database 'x'; database exists (MySQL)10071241 — MySQL ERROR 1241 (21000): Operand should contain 1 column(s) (MySQL)12411146 — MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist (MySQL)1146ambiguous column — Column reference is ambiguous / Column 'id' in field list is ambiguous (MySQL 1052) (SQL)ambiguous columnGROUP BY — Column must appear in the GROUP BY clause / isn't in GROUP BY (MySQL 1055 only_full_group_by) (SQL)GROUP BYaggregate in WHERE — ERROR: aggregate functions are not allowed in WHERE (use HAVING) / MySQL 1111 Invalid use of group function (SQL)aggregate in WHEREORDER BY with DISTINCT — ORDER BY items must appear in the select list if SELECT DISTINCT is specified (SQL)ORDER BY with DISTI…COUNT — COUNT(column) ignores NULLs: counts differ from COUNT(*) (SQL)COUNT1452 — MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails (MySQL)1452GRAPHQL_VALIDATION_FAILED — GraphQL: Cannot query field "x" on type "Y" (API)GRAPHQL_VALIDATION_…1406 — MySQL ERROR 1406: Data too long for column (MySQL)140642703 — PostgreSQL: ERROR: column "x" does not exist (PostgreSQL)427031008 — MySQL ERROR 1008 (HY000): Can't drop database 'x'; database doesn't exist (MySQL)10081067 — MySQL ERROR 1067 (42000): Invalid default value for 'created_at' (MySQL)1067ORA-00904 — ORA-00904: "X": invalid identifier (SQL)ORA-00904ORA-00001 — ORA-00001: unique constraint (SCHEMA.PK_X) violated (SQL)ORA-00001ORA-00018 — ORA-00018: maximum number of sessions exceeded (SQL)ORA-000181051 — MySQL ERROR 1051 (42S02): Unknown table 'x' (MySQL)10511060 — MySQL ERROR 1060 (42S21): Duplicate column name 'x' (MySQL)10601071 — MySQL ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes (MySQL)1071Subquery returns more than 1 row — Subquery returns more than 1 row (MySQL 1242) / more than one row returned by a subquery used as an expression (SQL)Subquery returns mo…NonUniqueResultException — IncorrectResultSizeDataAccessException: query did not return a unique result: 2 (Java)NonUniqueResultExce…1093 — MySQL ERROR 1093 (HY000): You can't specify target table 'x' for update in FROM clause (MySQL)1093

Directly related (7)

Two steps away (21)

1146MySQL

MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist

The query references a table that MySQL can’t find in that database.

ambiguous columnSQL

Column reference is ambiguous / Column 'id' in field list is ambiguous (MySQL 1052)

A column name exists in more than one joined table, so the database doesn’t know which one you mean.

GROUP BYSQL

Column must appear in the GROUP BY clause / isn't in GROUP BY (MySQL 1055 only_full_group_by)

You selected a column that is neither grouped nor aggregated, so the result would be ambiguous.

aggregate in WHERESQL

ERROR: aggregate functions are not allowed in WHERE (use HAVING) / MySQL 1111 Invalid use of group function

An aggregate (SUM, COUNT, AVG) was used in WHERE, which filters rows before grouping.

ORDER BY with DISTINCTSQL

ORDER BY items must appear in the select list if SELECT DISTINCT is specified

With DISTINCT, the database can only sort by columns that are part of the selected result.

COUNTSQL

COUNT(column) ignores NULLs: counts differ from COUNT(*)

`COUNT(col)` counts only non-NULL values, while `COUNT(*)` counts rows, so totals don't match.

1452MySQL

MySQL ERROR 1452: Cannot add or update a child row: a foreign key constraint fails

You inserted/updated a row whose foreign key value doesn’t exist in the referenced parent table.

GRAPHQL_VALIDATION_FAILEDAPI

GraphQL: Cannot query field "x" on type "Y"

The query asks for a field that doesn’t exist in the server’s schema (or isn’t available on that type).

1406MySQL

MySQL ERROR 1406: Data too long for column

The value is longer than the column allows (e.g. 300 characters into VARCHAR(255)), and strict mode rejects it instead of truncat…

42703PostgreSQL

PostgreSQL: ERROR: column "x" does not exist

PostgreSQL can’t find the column — a missing migration, a case-sensitive quoted name, or a string literal written in double quote…

1008MySQL

MySQL ERROR 1008 (HY000): Can't drop database 'x'; database doesn't exist

DROP DATABASE targeted a database that isn’t there.

1067MySQL

MySQL ERROR 1067 (42000): Invalid default value for 'created_at'

A column’s DEFAULT isn’t allowed in the current SQL mode — classically '0000-00-00 00:00:00' with NO_ZERO_DATE.

ORA-00904SQL

ORA-00904: "X": invalid identifier

A column name in the statement doesn’t exist (or is misquoted).

ORA-00001SQL

ORA-00001: unique constraint (SCHEMA.PK_X) violated

An insert/update duplicated a value in a unique or primary key constraint.

ORA-00018SQL

ORA-00018: maximum number of sessions exceeded

The database reached its SESSIONS limit, so no new connection can be created.

1051MySQL

MySQL ERROR 1051 (42S02): Unknown table 'x'

DROP TABLE targeted a table that doesn’t exist.

1060MySQL

MySQL ERROR 1060 (42S21): Duplicate column name 'x'

A CREATE/ALTER adds a column that already exists, or a SELECT in a view/derived table produces two columns with the same name.

1071MySQL

MySQL ERROR 1071 (42000): Specified key was too long; max key length is 767 bytes

An index on a VARCHAR is too long for the row format — classic with utf8mb4 VARCHAR(255) on MySQL 5.6/MariaDB 10.1.

Subquery returns more than 1 rowSQL

Subquery returns more than 1 row (MySQL 1242) / more than one row returned by a subquery used as an expression

A subquery used where a single value is expected (`= (SELECT …)`) returned several rows.

NonUniqueResultExceptionJava

IncorrectResultSizeDataAccessException: query did not return a unique result: 2

A query expected one row but found several.

1093MySQL

MySQL ERROR 1093 (HY000): You can't specify target table 'x' for update in FROM clause

An UPDATE/DELETE uses a subquery that reads from the same table, which MySQL doesn’t allow directly.