Cross join

This returns every combination of rows from both tables (also known as the Cartesian product). For instance, if both tables have 5 rows each, the cross join result will have 25 rows (5 x 5 = 25). If the resulting row count is very high, BigQuery will a throw resource exceeded exception. It is better to run CROSS JOIN queries by setting the destination table so that the result is stored in a table for review:

#legacySQL
SELECT repos.repo_name,repos.watch_count,repocommits.author.name,repocommits.committer.name
FROM [bigquery-public-data:github_repos.sample_repos] repos
CROSS JOIN [bigquery-public-data:github_repos.sample_commits] repocommits
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.15.168.214