Does BigQuery support the usage of WITH views in the 'IN' clause?
WITH validyears as (SELECT Year FROM movies WHERE Year > 2005)
SELECT *
FROM movies
WHERE Year IN validyears
I get "Unrecognized name" error.
CodePudding user response:
Try this
WITH validyears as (SELECT Year FROM movies WHERE Year > 2005)
SELECT *
FROM movies
WHERE Year IN (Select year from validyears)