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
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.
Directly related (7)
MySQL ERROR 1064 (42000): You have an error in your SQL syntax
MySQL couldn’t parse the query. The text after “near” shows where parsing failed.
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
A selected column isn't aggregated and isn't in GROUP BY.
MySQL ERROR 1005 (HY000): Can't create table (errno: 150 "Foreign key constraint is incorrectly formed")
A foreign key definition is invalid — the referenced column’s type, index or charset doesn’t match.
MySQL ERROR 1054 (42S22): Unknown column in 'field list'
The query references a column that doesn’t exist in the table (or an unquoted string being read as a column).
ORA-00979: not a GROUP BY expression
A selected column is neither in GROUP BY nor inside an aggregate function.
MySQL ERROR 1007 (HY000): Can't create database 'x'; database exists
CREATE DATABASE ran for a database that already exists.
MySQL ERROR 1241 (21000): Operand should contain 1 column(s)
A subquery or expression returned several columns where only one is expected.
Two steps away (21)
MySQL ERROR 1146 (42S02): Table 'db.table' doesn't exist
The query references a table that MySQL can’t find in that database.
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.
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.
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 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.
COUNT(column) ignores NULLs: counts differ from COUNT(*)
`COUNT(col)` counts only non-NULL values, while `COUNT(*)` counts rows, so totals don't match.
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: 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).
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…
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…
MySQL ERROR 1008 (HY000): Can't drop database 'x'; database doesn't exist
DROP DATABASE targeted a database that isn’t there.
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-00904: "X": invalid identifier
A column name in the statement doesn’t exist (or is misquoted).
ORA-00001: unique constraint (SCHEMA.PK_X) violated
An insert/update duplicated a value in a unique or primary key constraint.
ORA-00018: maximum number of sessions exceeded
The database reached its SESSIONS limit, so no new connection can be created.
MySQL ERROR 1051 (42S02): Unknown table 'x'
DROP TABLE targeted a table that doesn’t exist.
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.
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 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.
IncorrectResultSizeDataAccessException: query did not return a unique result: 2
A query expected one row but found several.
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.