This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
main.object_id | |
, title | |
, artist_display_name | |
, 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 #notice how UNNEST is placed after the INNER JOIN |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH races AS ( | |
SELECT "800M" AS race, | |
[STRUCT("Rudisha" as name, [23.4, 26.3, 26.4, 26.1] as splits), | |
STRUCT("Makhloufi" as name, [24.5, 25.4, 26.6, 26.1] as splits), | |
STRUCT("Murphy" as name, [23.9, 26.0, 27.0, 26.0] as splits), | |
STRUCT("Bosse" as name, [23.6, 26.2, 26.5, 27.1] as splits), | |
STRUCT("Rotich" as name, [24.7, 25.6, 26.9, 26.4] as splits), | |
STRUCT("Lewandowski" as name, [25.0, 25.7, 26.3, 27.2] as splits), | |
STRUCT("Kipketer" as name, [23.2, 26.1, 27.3, 29.4] as splits), | |
STRUCT("Berian" as name, [23.7, 26.1, 27.0, 29.3] as splits)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH races AS ( | |
SELECT "800M" AS race, | |
[STRUCT("Rudisha" as name, [23.4, 26.3, 26.4, 26.1] as splits), | |
STRUCT("Makhloufi" as name, [24.5, 25.4, 26.6, 26.1] as splits), | |
STRUCT("Murphy" as name, [23.9, 26.0, 27.0, 26.0] as splits), | |
STRUCT("Bosse" as name, [23.6, 26.2, 26.5, 27.1] as splits), | |
STRUCT("Rotich" as name, [24.7, 25.6, 26.9, 26.4] as splits), | |
STRUCT("Lewandowski" as name, [25.0, 25.7, 26.3, 27.2] as splits), | |
STRUCT("Kipketer" as name, [23.2, 26.1, 27.3, 29.4] as splits), | |
STRUCT("Berian" as name, [23.7, 26.1, 27.0, 29.3] as splits)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH races AS ( | |
SELECT "800M" AS race, | |
[STRUCT("Rudisha" as name, [23.4, 26.3, 26.4, 26.1] as splits), | |
STRUCT("Makhloufi" as name, [24.5, 25.4, 26.6, 26.1] as splits), | |
STRUCT("Murphy" as name, [23.9, 26.0, 27.0, 26.0] as splits), | |
STRUCT("Bosse" as name, [23.6, 26.2, 26.5, 27.1] as splits), | |
STRUCT("Rotich" as name, [24.7, 25.6, 26.9, 26.4] as splits), | |
STRUCT("Lewandowski" as name, [25.0, 25.7, 26.3, 27.2] as splits), | |
STRUCT("Kipketer" as name, [23.2, 26.1, 27.3, 29.4] as splits), | |
STRUCT("Berian" as name, [23.7, 26.1, 27.0, 29.3] as splits)] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT "800M" AS race, | |
[STRUCT("Rudisha" as name, [23.4, 26.3, 26.4, 26.1] as splits), | |
STRUCT("Makhloufi" as name, [24.5, 25.4, 26.6, 26.1] as splits), | |
STRUCT("Murphy" as name, [23.9, 26.0, 27.0, 26.0] as splits), | |
STRUCT("Bosse" as name, [23.6, 26.2, 26.5, 27.1] as splits), | |
STRUCT("Rotich" as name, [24.7, 25.6, 26.9, 26.4] as splits), | |
STRUCT("Lewandowski" as name, [25.0, 25.7, 26.3, 27.2] as splits), | |
STRUCT("Kipketer" as name, [23.2, 26.1, 27.3, 29.4] as splits), | |
STRUCT("Berian" as name, [23.7, 26.1, 27.0, 29.3] as splits)] | |
AS participants |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH paintings AS | |
( | |
SELECT ['painting', 'sculpture', 'installation'] AS artworks | |
UNION ALL | |
SELECT ['drawing', 'painting'] AS artworks | |
UNION ALL | |
SELECT ['painting', 'drawing', 'collage'] AS artworks | |
) | |
SELECT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH paintings AS | |
( | |
SELECT ['painting', 'sculpture', 'installation'] AS artworks | |
UNION ALL | |
SELECT ['drawing', 'painting'] AS artworks | |
UNION ALL | |
SELECT ['painting', 'drawing', 'collage'] AS artworks | |
) | |
SELECT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT ['painting', 'sculpture', 'installation'] AS artworks | |
UNION ALL | |
SELECT ['drawing', 'painting'] AS artworks | |
UNION ALL | |
SELECT ['painting', 'drawing', 'collage'] AS artworks |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
SELECT | |
object_id | |
, y | |
, x | |
FROM | |
`bigquery-public-data.the_met.vision_api_data` AS main | |
CROSS JOIN UNNEST(faceAnnotations) fA | |
CROSS JOIN UNNEST(fA.boundingPoly.vertices) vertices | |
WHERE | |
object_id BETWEEN 647500 and 647600 |
NewerOlder