如何在 Big Query 的 IN 运算符中包含多个值

How to include more than one value in IN operator in Big Query

我有以下在 Big Query 中运行良好的查询:

SELECT
date,
nombre,
i.identifier,
i.hour
FROM
  `table` t, unnest(identifier_s) i
where 2 in unnest(i.hour)

但是,我需要在 IN 运算符的搜索值中包含更多整数。像这样:

...where (2 or 5 or 6) in unnest...

考虑以下示例 - 希望您能够将其应用于您的特定用例

select date, nombre, i.identifier, i.hour 
from `adsmovil-produccion.analisis_alejandro.100_temp_pers` t, 
unnest(identifier_s) i 
where exists (
  select 1
  from unnest(i.hour) x
  join unnest([2, 5, 6]) x
  using(x)
)