我在Google Big Query中编写了一个查询,并希望获得与我在 Google Analytics 中看到的相同数量的用户。我使用 Legacy 和 Normal SQL,在会话相同的情况下获得了 3 个不同的用户编号。我做错了什么,或者有人对此有解释/解决方案吗?每一个帮助表示赞赏!
普通 SQL
SELECT COUNT(DISTINCT fullVisitorId) AS users, SUM(IF(totals.visits IS
NULL,0,totals.visits)) AS sessions
FROM `XXX.XXX.ga_sessions_*`
WHERE _TABLE_SUFFIX BETWEEN '20181120' AND '20181120'
旧版 SQL
SELECT COUNT(DISTINCT fullVisitorId) AS users, SUM(IF(totals.visits IS
NULL,0,totals.visits)) AS sessions
FROM TABLE_DATE_RANGE([XXX:XXX.ga_sessions_], TIMESTAMP('2018-11-20'),
TIMESTAMP('2018-11-20'))