Search code examples
google-bigquerytemp-tables

multiple template tables in one query of google bigquery


I have a query in SQL in this format:

WITH table1(definition1) AS (SELECT statement1),
     table2(definition2) AS (SELECT statement2),
     table3(definition3) AS (SELECT statement3),
SELECT statement;

In which I have multiple temp tables in a single query. Is there any equivalent query for this types of queries ( WITH ... AS) in google bigquery?


Solution

  • WITH clause is available in BigQuery Standard SQL (see Enabling Standard SQL)