Skip to content

Instantly share code, notes, and snippets.

@shotleft
Last active December 27, 2019 06:01
Show Gist options
  • Save shotleft/8782154b4fc86d6dfea8c9f649080be9 to your computer and use it in GitHub Desktop.
Save shotleft/8782154b4fc86d6dfea8c9f649080be9 to your computer and use it in GitHub Desktop.
bq_nest12
SELECT
main.object_id
, title
, artist_display_name
, ARRAY_TO_STRING(ARRAY_AGG(lA.description), ';') AS description
FROM `bigquery-public-data.the_met.objects` AS main
INNER JOIN
`bigquery-public-data.the_met.vision_api_data` AS api
ON main.object_id = api.object_id
CROSS JOIN UNNEST(labelAnnotations) lA
WHERE
LOWER(artist_display_name) = 'claude monet'
GROUP BY
1, 2, 3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment