Bigquery, Execution Plan, Query Optimization.
shuffle persistence layer between intermediate stages Filter out your data as early as possible. If you can use WHERE clause to filter data in the first CTE, do not put it in the last. If you filter data at the 3rd CTE when it couldve been at the 1st, workers executing your 1st& 2nd CTEs have to