BigQuery error · Query and syntax errors
Unrecognized name
A column, alias or range variable in the query doesn't exist in the scope where it is used. Usually it is a typo (BigQuery then adds "Did you mean ...?"), a SELECT alias used in WHERE or GROUP BY of the same query level, or a column that isn't in the tables of the FROM clause.
The error message
Unrecognized name: <name> at [<line>:<column>]
Causes
A SELECT alias used in WHERE
WHERE is evaluated before the SELECT list, so aliases defined in SELECT don't exist there. SELECT amount * 2 AS amount_with_tax ... WHERE amount_with_tax > 5 fails with Unrecognized name: amount_with_tax.
A typo in a column name
When a similar name exists, the message adds a suggestion: Unrecognized name: amout; Did you mean amount? at [1:72]. Column names are not case-sensitive in BigQuery, so case alone doesn't cause this error for columns.
The column belongs to a table that isn't in scope
A column from a table that was removed from the FROM clause, a column referenced outside the subquery or CTE that defines it, or a field of a nested STRUCT referenced without its parent (city instead of address.city).
Double quotes or the wrong dialect
In GoogleSQL, double quotes make a string literal, not an identifier, so "order_id" is the text order_id. Names from other systems with spaces or special characters need backticks, and a name that is a reserved keyword can produce a syntax error instead.
How to fix it
1. Repeat the expression, or filter in an outer query
Use the expression itself in WHERE, or compute the alias in a CTE and filter on it in the next step.
WITH orders AS (
SELECT 1 AS order_id, 10.5 AS amount UNION ALL
SELECT 2, 1.5
),
with_tax AS (
SELECT order_id, amount * 1.2 AS amount_with_tax
FROM orders
)
SELECT order_id, amount_with_tax
FROM with_tax
WHERE amount_with_tax > 5;2. Check the schema for the exact column name
List the columns of the table, including nested field paths, before fixing the query.
SELECT field_path, data_type
FROM `project.dataset`.INFORMATION_SCHEMA.COLUMN_FIELD_PATHS
WHERE table_name = 'orders'
ORDER BY field_path;3. Use QUALIFY or HAVING for computed filters
Filters on window functions go in QUALIFY, filters on aggregates in HAVING. Both can reference SELECT aliases, unlike WHERE.
WITH events AS (
SELECT 'u1' AS user_id, TIMESTAMP '2026-11-22 10:00:00 UTC' AS event_ts UNION ALL
SELECT 'u1', TIMESTAMP '2026-11-22 11:00:00 UTC'
)
SELECT user_id, event_ts,
ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY event_ts DESC) AS rn
FROM events
QUALIFY rn = 1;How to prevent it
- Dry-run queries in CI: an unrecognized name is caught for free before the scheduled run.
- Alert on schema changes in upstream tables, a renamed or dropped column is the usual reason a working pipeline starts failing with this error.
- Prefer CTEs with explicit column lists over
SELECT *, so a missing column is visible in the step that needs it.
FAQ
Can I use a column alias in WHERE in BigQuery?
No. WHERE is evaluated before the SELECT list. Repeat the expression, filter in an outer query or CTE, or use HAVING (aggregates) or QUALIFY (window functions), which can reference SELECT aliases.
Is a query that fails with Unrecognized name billed?
No. The error is raised during analysis, before data is read, so nothing is billed on-demand and no slot time is used under editions.
Can GROUP BY use a SELECT alias in BigQuery?
Yes. GoogleSQL accepts SELECT aliases and column positions in GROUP BY and ORDER BY, so GROUP BY order_month works when order_month is defined in the SELECT list.
Related
SQL reference
More query and syntax errors
All BigQuery error messages · What 50M daily events say about BigQuery failures
