We're using BigQuery via an API that seems to be mostly an interface to the Web UI Query / Results window, and I need to run a query there that creates intermediate results and then joins against them (solving the problem step-wise because BigQuery does not seem to support nested subqueries (with joins to the outer) or functions in join clauses).
I can do this in the BigQuery UI by running my first query (for the intermediate result set), getting the temp-table name from the Web UI's Query History, and running the second query joining against that, or by saving the result of the first query to a more permanent tablename in the UI.
Is there a way to, within the query, tell BigQuery to save the output to a table - a syntactic equivalent of the destinationTable attributes in the python query configuration, for example?