【发布时间】:2018-06-15 16:21:09
【问题描述】:
取消嵌套 hits.customdimension 和 hits.product.customdimension 会夸大交易收入
SELECT
sum(totals.totalTransactionRevenue)/1000000 as revenue,
(SELECT MAX(IF(index=10,value,NULL)) FROM UNNEST(product.customDimensions)) AS product_CD10,
(SELECT MAX(IF(index=1,value,NULL)) FROM UNNEST(hits.customDimensions)) AS CD1
FROM
`XXXXXXXXXXXXXXX.ga_sessions_*`,
UNNEST(hits) AS hits,
UNNEST(hits.product) as product
WHERE
_TABLE_SUFFIX BETWEEN "20180608"
AND "20180608"
group by product_CD10,CD1
有没有一种方法可以让我得到一个平面表,如果我应用收入总和,它应该给出正确的结果。
【问题讨论】:
标签: google-analytics google-bigquery