0
votes

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

1
Please show what you have tried so far as part of your question. Did you try writing a query? - Elliott Brossard
i think the question is quite simple and self-explanatory - but still, I second Elliott's comment - in SO we want to see your some efforts so we can provide specific help. So I ideally in your question you should show a Minimal, Complete, and Verifiable example of the code that you are having problems with, then we can try to help with the specific problem. read How to Ask. - Mikhail Berlyant

1 Answers

3
votes
#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