I'm trying to run a query using Standard SQL Dialect (ie not Legacy SQL) on BigQuery. My query is:
SELECT
date, hits.referer
FROM `refresh.ga_sessions_xxxxxx*`
LIMIT 1000
But keep getting the error
Error: Cannot access field referer on a value with type
ARRAY<STRUCT<hitNumber INT64, time INT64, hour INT64, ...>> at [2:12]
Anyone know the proper syntax?
if you are looking for all referers - try
SELECT date, h.referer
FROM `refresh.ga_sessions_xxxxxx*`, UNNEST(hits) as h
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With