mysql - 预期输入结束,但在连接中使用 UNNEST 时获得关键字“ON”(bigQuery)
问题描述
我试图在使用 JOIN 和 UNNEST 时从这些查询中获取一些数据。
SELECT
name,
p.gender as Gender,
c.cc.display as condition,
FROM `bigquery-public-data.fhir_synthea.patient` AS p, UNNEST(p.name) n, UNNEST(n.given) name, UNNEST(p.address) address
JOIN `bigquery-public-data.fhir_synthea.condition` AS c , UNNEST (c.code.coding) as cc
ON p.id = c.id
错误出现在“ON”->语法错误:预期输入结束,但关键字 ON
如果我尝试删除“CC”并编写这样的命令
c.code.coding.display as condition
然后我收到“无法访问类型为 ARRAY<STRUCT<userSelected BOOL、版本 STRING、代码 STRING 的值的字段显示”的错误。
请告诉在使用 UNNEST & JOIN 时如何在大查询中解决这个问题。或者有没有其他方法可以做到这一点?
解决方案
推荐阅读
- r - 使用 testthat 对唯一性进行大规模测试
- java - 当我尝试使用 Volley 将图像从 Android 上传到 PHP 服务器时出现错误(JSONException)
- java - 如何从 Mule 4 中的文件中读取 JSON 字符串
- c++ - g++ 认为我的类声明是“前向声明”
- ssh - 创建时 .ssh 目录中存在什么?
- xamarin - Xamarin.Forms 4.0 CollectionView 下拉刷新
- python - 如何在 TensorFlow Eager 中分析图形函数?
- c# - 如何在 .NET Core 中记录所有 Web 请求的响应代码
- .net - 即使安装未完成,Wix 重启也会创建卸载
- r - 例子?如何在 lmer 中指定 theta 和 beta 的起始值?