Inner join

The public datasets provided in BigQuery can be used as an example for table joins. An inner join returns records with matching values for the join columns from both the tables on the join. Here is an example of an inner join using data from the New York Metropolitan Museum of Art (https://cloud.google.com/blog/big-data/2017/08/when-art-meets-big-data-analyzing-200000-items-from-the-met-collection-in-bigquery):

#standardSQL
SELECT images.public_caption,
objects.department AS department
FROM `bigquery-public-data.the_met.images` images
INNER JOIN `bigquery-public-data.the_met.objects` objects on objects.object_id = images.object_id

The result set returned includes data from both tables joined on the object_id dimension as specified in the query.

..................Content has been hidden....................

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