I’m trying to create a result set of table names and column names. In table A I have the list of table names and in Table B I have the list of column names. Each table should have the full list of columns. So: Table A table_name Table1 Table2 Table B column_name Column1 Column2 Column3 The result I want is:
Tag: cartesian-product
Clean way to construct cartesian joins in BigQuery (SQL)
I have multiple lists, and I want to construct cartesian joins of these lists using SQL. I’m wondering if you know a cleaner method than the one below. Thanks Answer Your query looks fine, but there is no reason to use CTEs: