Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/image-processing/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Google bigquery bigquery中是否有与postgres Any()数组等价的内容?_Google Bigquery - Fatal编程技术网

Google bigquery bigquery中是否有与postgres Any()数组等价的内容?

Google bigquery bigquery中是否有与postgres Any()数组等价的内容?,google-bigquery,Google Bigquery,最近从Postgres开始讨论BigQuery——我习惯于在特定情况下相当经常地使用以下模式,但当然不会在CTE集太大的情况下使用 with cte1 as ( select id from my_table where feature1 = x, feature2 = y ) select id, detail1, detail2, detail3 from my_table where id = ANY( select id from cte1 ) 使用我的CTE作为收集特定

最近从Postgres开始讨论BigQuery——我习惯于在特定情况下相当经常地使用以下模式,但当然不会在CTE集太大的情况下使用

with cte1 as (
   select id from my_table where feature1 = x, feature2 = y
)
select id, detail1, detail2, detail3 from my_table
    where id = ANY( select id from cte1 )
使用我的CTE作为收集特定兴趣记录的地方的效果—共同点、不常见点、异常值、重复点等,然后使用id=CTE模式中的任意选择id将其传递给我的主选择

BigQuery中的等价物是什么?

等价物是

where id in ( select id from CTE )    
因此,您的查询可以如下所示

with cte1 as (
   select id from my_table where feature1 = x and feature2 = y
)
select id, detail1, detail2, detail3 from my_table
    where id in ( select id from cte1 )
等价物是

where id in ( select id from CTE )    
因此,您的查询可以如下所示

with cte1 as (
   select id from my_table where feature1 = x and feature2 = y
)
select id, detail1, detail2, detail3 from my_table
    where id in ( select id from cte1 )