【发布时间】:2015-06-25 20:57:55
【问题描述】:
有人可以解释如何在 bigquery 中查询 customDimensions 吗?
我的查询使用简单的 where 子句,即
SELECT COUNT(DISTINCT fullVisitorId)
FROM GA_SESSION
WHERE hits.customDimensions.index = 4
AND hits.customDimensions.value = 'variable1'
AND hits.page.pagePath LIKE '%something%';
但是现在当我尝试进行聚合时,或者如果我尝试不使用 group by 的 EXACT_COUNT_DISTINCT 时,我会收到一个错误,即
SELECT date, COUNT(DISTINCT fullVisitorId)
FROM GA_SESSION
WHERE hits.customDimensions.index = 4
AND hits.customDimensions.value = 'variable1'
AND hits.page.pagePath LIKE '%something%'
group by date
错误是: 查询失败 错误:无法查询重复字段 customDimensions.index 和 hits.customDimensions.index 的叉积。
【问题讨论】:
标签: aggregate-functions google-bigquery