使用多级嵌套在SQL中解除变量

时间:2018-03-07 23:34:44

标签: sql nested

我尝试运行查询以选择上行链路容量:

SELECT
  AirmaxStatus.Wireless.Sta.Airmax.UplinkCapacity   
FROM
  `commonwealth-networks.ds.radio_status` 
WHERE MacAddress = 'f2:7f:c4:e2:61:a8'
And date(created) >= '2018-03-06'
ORDER BY created desc

我收到了错误

Cannot access field Airmax on a value with type ARRAY<STRUCT<Airmax 
STRUCT<DownlinkCapacity INT64, UplinkCapacity INT64, Rx STRUCT<Cinr 
INT64>, ...>, Chainrssi ARRAY<INT64>, Distance INT64, ...>> 

我试图取消查询,但我还没有成功完成此操作:

SELECT
   wireless 
FROM
  `commonwealth-networks.ds.radio_status`,
   UNNEST(AirmaxStatus.Wireless.Sta.Airmax.UplinkCapacity) wireless
WHERE MacAddress = 'f2:7f:c4:e2:61:a8'
And date(created) >= '2018-03-06'
ORDER BY created desc   

AirmaxStatus.Wireless.Sta.Airmax.UplinkCapacity似乎有多个阵列合二为一。如何拉动UplinkCapacity?

0 个答案:

没有答案