【发布时间】:2020-05-18 05:33:30
【问题描述】:
我无法弄清楚我的代码的哪一部分是错误的。 我使用了 UNNEST 函数,但错误消息仍然存在 Google Bigquery 中的“无法访问类型为 ARRAY> 的值的字段 productSKU”。
我的查询如下:
SELECT
hits.product.productSKU AS product_SKU,
hits.product.v2ProductName AS Product_Name,
SUM(totals.transactionRevenue) AS Total_Revenue,
FROM
`bigquery-public-data.google_analytics_sample.ga_sessions_*`,
UNNEST(hits.product) AS hits
WHERE
_TABLE_SUFFIX BETWEEN '20170701' AND '20170731' AND totals.transactions >= 1
Group by
hits.product.productSKU
Order by
v2ProductName DESC
【问题讨论】:
标签: sql google-bigquery