Does BigQuery support the suggestion WITH? I don't like formatting too many subqueries.
WITH
For instance:
WITH alias_1 AS (SELECT foo1 c FROM bar) , alias_2 AS (SELECT foo2 c FROM bar a, alias_1 b WHERE b.c = a.c) SELECT * FROM alias_2 a;
Recently introduced BigQuery Standard SQL supports WITH clauseRead more about WITH clause
See also Enabling Standard SQL
Bigqery Standard SQl supports the WITH clause. The syntax is shown below.
with table2 as (Select column1,column2 from table1) select column1 from table2