我試圖瞭解GoogleBigQuery,我已經在查詢中看到了這一點:AS t0
Google BigQuery的字符串「t0」是什麼意思?
我也看到連接到某些指標或維度這樣t0.postId
這裏T0是我想要的全部查詢瞭解:
SELECT t0.Author, COUNT(DISTINCT t0.postId, 50000) AS t0.calc_FPB538 FROM (SELECT
MAX(IF (hits.customDimensions.index = 10, hits.customDimensions.value, NULL)) WITHIN RECORD AS postId,
date(MAX(IF (hits.customDimensions.index = 4, hits.customDimensions.value, NULL))) WITHIN RECORD AS Datepublished,
MAX(IF (hits.customDimensions.index = 1, hits.customDimensions.value, NULL)) WITHIN RECORD AS Country,
MAX(IF (hits.customDimensions.index = 7, hits.customDimensions.value, NULL)) WITHIN RECORD AS Author,
FROM
[My_data.ga_sessions_20161104]) AS t0 WHERE (STRFTIME_UTC_USEC(TIMESTAMP_TO_USEC(TIMESTAMP(STRING(t0.Datepublished))), '%Y%m%d') >= '20161102' AND STRFTIME_UTC_USEC(TIMESTAMP_TO_USEC(TIMESTAMP(STRING(t0.Datepublished))), '%Y%m%d') <= '20161108') GROUP EACH BY t0.Author ORDER BY t0.calc_FPB538 DESC
這是什麼意思,我該如何使用它?
謝謝。
在SQL類型查詢'as'是標記的表的方法。當你有連接時,這很有用,所以你可以指定你的意思(當他們有相同名字的列時,最需要的)。所以你把它標記爲t0,並且正在引用數據點'postId'。 – scrappedcola
你是什麼引用的數據點意味着什麼? –
在SQL術語'postId'是由標籤'引用的表中的列t0' – scrappedcola