我正在尝试子查询来选择我的Google Analytics(分析)数据。附件是我的查询如下:
with subQ_googleanalytics AS(
select date(timestamp_micros(visitstarttime*1000000)) as GA_date
, fullvisitorID as GA_visitorID
, safe_cast(userid as string) as GA_userid
, totals.visits as GA_interactionTF
, concat(safe_cast(fullvisitorid as string), safe_cast(userid as string), safe_cast(totals.visits as string)) as akandicount
from `43864393.ga_sessions_*`
where _TABLE_SUFFIX between
FORMAT_DATE("%Y%m%d", DATE_SUB(CURRENT_DATE(), INTERVAL 7 DAY))
AND FORMAT_DATE("%Y%m%d", DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY)
))
select *
from subQ_googleanalytics
我想通过使用子查询来计数会话。这是否意味着concat
不能与With
子句一起使用?