sql - 使用 Bigquery 查找未嵌套的值
问题描述
我有两个表,其中表 1 包含两列:一列包含嵌入在字符串值中的 URL 列表(每个单元格包含多个 URL),以及一个日期列。我设法将所有未嵌套的 URL 提取到表 2。我需要查看这两个表以获取每个抓取的 URL 的日期(如表 3 所示)
Table 1 string | Date
______________
STRING 1 Date 1
STRING 2 Date 2
STRING 3 Date 3
Table 2 Scraped URL | string
______________________
scraped URL 1 STRING 1
scraped URL 2 STRING 2
scraped URL 3 STRING 3
Table 3 scraped URL | Date
_________________________
scraped URL 1 Date 1
scraped URL 2 Date 2
scraped URL 3 Date 3
解决方案
你在找一个join
吗?
select t2.scraped_url, t1.date
from table1 t1 join
table2 t2
on t2.scraped_url = t1.url
推荐阅读
- javascript - JSON.parse() reviver 函数的奇怪行为
- apache-spark - 为什么 Apache Spark 编程指南一直使用 SparkContext?
- angular - 角度材质表不呈现数据源行
- android - 在 Facebook Audience Network SDK 5.2.1 版中,我应该使用什么来代替 AdIconView?
- python-3.x - 如何在单个命令中将数据集中的所有“对象”值转换为浮点数或整数?
- node.js - 安装后如何设置 Dockerfile 以运行 babel?
- node.js - 更新node.js并成功检查root版本,但退出root后,没有任何变化
- java - 不在war文件的类文件中创建struts.xml文件
- intellij-idea - Intellij 搜索所有文件(ctrl + shift + f)没有找到所有匹配项?设置问题?
- c# - 如何使用 EF Core Code-First 在自身上桥接表