user3878636
user3878636

Reputation: 183

Can query tables from different datasets in BigQuery

In Google BigQuery, can a query joins two tables in different datasets? say If I want to join these two tables, what should I do? dataset1:table1 and dataset2:table2

Thank you

Upvotes: 0

Views: 2351

Answers (1)

Mikhail Berlyant
Mikhail Berlyant

Reputation: 173046

#standardSQL
SELECT <fields list>
FROM `project.dataset1.table1` t1
JOIN `project.dataset2.table2` t2
ON t1.id = t2.id   

see more about JOINs in documentation

Upvotes: 3

Related Questions