google-bigquery - BigQuery 中条件为 80% 的 Where 子句?
问题描述
我必须在 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
推荐阅读
- xml - 获取 XPATH 中属性的字符串值
- windows - 在 Windows 10 上访问剪贴板时应用程序崩溃
- angular - 当 Angular 4 应用程序包含特殊字符时,无法匹配任何路由错误
- amazon-web-services - 通过 AWS CLI 获取实例生命周期
- google-apps-script - 将脚本运行到特定工作表 - Google 工作表
- sql - 需要复制带有父 ID 的数据
- java - Spring Batch 的集成导致先前功能 @Transactional 方法中的 TransactionRequiredException
- kubernetes - 利用集群节点磁盘的 Kubernetes 存储提供程序
- java - 无法使用java访问linux中的文件
- ios - cordova-plugin-camera:IOS 设备上的崩溃 wesh 错误“未选择图像”