0
新增至stackoverflow。很長時間的享受,第一次海報。Google BigQuery:導出一個事件的總事件動作
我一直在嘗試谷歌BigQuery與SQL技能很少。因此,我希望你能幫助我。我正在嘗試爲一個特定的eventAction導出關於客戶端ID級別(Google Aanalytics術語,用於唯一用戶標識)的數據。我正在研究獲取與該特定活動相關聯的點擊總數。然而,我建立的查詢可能會讓我回顧與CLIENTS相關的所有事件的事件命中總數,它們與我對'search_con'感興趣的eventAction有某種交互。
我希望構建一個查詢,只會返回eventLabel WHERE eventAction EQUALS'search_con'的總點擊量。我對這個範圍以外的任何命中不感興趣。
我添加了從我的查詢當前輸出的圖像。正如你所看到的,我們爲選定的eventLabels提供了大量的eventHits。這是意想不到的。它應該在1-20 eventHits範圍內。
你能幫我嗎?
SELECT
fullVisitorId,
hits.eventInfo.eventLabel eventLabel,
hits.eventInfo.eventAction eventAction,
SUM (totals.hits) eventHits
FROM
(TABLE_DATE_RANGE([111210586.ga_sessions_], TIMESTAMP('2017-10-10'), TIMESTAMP('2017-10-11')))
WHERE
hits.eventInfo.eventAction = 'search_con'
AND hits.type = 'EVENT'
GROUP BY
fullVisitorId,
eventLabel,
eventAction
ORDER BY
4 ASC
樣本數據和預期的結果會有所幫助。您的查詢似乎按照您的描述進行。 –
嗨戈登,謝謝你的評論。我添加了查詢中的當前輸出和所需輸出的描述。 – JCDJ1990