Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

BigQuery array intersect [duplicate]

I have an array of values I'd like to filter results for if an array column contains any of these values, is there an easy way to perform an intersect in BigQuery using the standard SQL language?

like image 362
Callum Jones Avatar asked Apr 13 '26 13:04

Callum Jones


1 Answers

This should give you the general direction:

SELECT ...
WHERE EXISTS(SELECT 1 FROM UNNEST(array_column) a WHERE a IN UNNEST(array_values))
like image 176
Mosha Pasumansky Avatar answered Apr 16 '26 06:04

Mosha Pasumansky



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!