BigQuery 中条件为 80% 的 Where 子句?
Where clause with 80% true Condition in BigQuery?
我必须在 BigQuery 中放置一个查询,我们有 100 个条件(在 where 子句中)。我想,如果 80 多个条件中的任何一个为真,那么它应该获取数据。
这在 Big Query 中可能吗?
以下适用于 BigQuery 标准 SQL
select *
from `project.dataset.table`
where (
select countif(condition)
from unnest([
condition1,
condition2,
condition3,
. . .
condition99,
condition100
]) condition
) >= 80
我必须在 BigQuery 中放置一个查询,我们有 100 个条件(在 where 子句中)。我想,如果 80 多个条件中的任何一个为真,那么它应该获取数据。 这在 Big Query 中可能吗?
以下适用于 BigQuery 标准 SQL
select *
from `project.dataset.table`
where (
select countif(condition)
from unnest([
condition1,
condition2,
condition3,
. . .
condition99,
condition100
]) condition
) >= 80