google-bigquery - 获取所有重复记录满足条件的嵌套数据集
问题描述
我在 BigQuery 表中有以下结构:
make STRING NOT NULLABLE
feature RECORD REPEATED
name STRING REQUIRED
以下查询返回至少一条feature
记录满足条件的所有数据length(f.name) = 5
:
select * from tbl t, t.feature tf
where length(tf.name) = 5
如何仅获取所有feature.name
记录都满足上述条件的数据?
解决方案
尝试子查询:
select * from tbl t
where not exists (
select 1
from unnest(t.feature) AS tf
where length(tf.name) != 5
)
推荐阅读
- c++ - 全局命名空间中没有名为“isinf”的成员
- docusaurus - Docusaurus:如何添加 SEO 元标记
- vb.net - 如何在 VB.NET 中更改数据网格视图的单列中的对齐方式?
- java - 给定一个字符串,找出最多包含两个不同字符的最长子字符串。如果有多个匹配的字符串返回第一个字符串
- javascript - 没有父级的 JQuery .find 和 >(更大)选择器
- php - 特殊字母 ÆØÅ 显示为问号
- android - 我怎样才能在android中获得我的图像视图的底部中心x,y?
- core-data - NSPersistentStoreRemoteChangeNotification 没有被解雇
- vector - Clojure 中的向量与向量
- java - 为什么这个嵌套的泛型转换会导致编译器错误