I have integrated Firebase analytics data with google BigQuery and everyday a new table gets created with the DATE stamp.
one sample table is "projectID.com_dev_sambhav_ANDROID.app_events_20170821"
One sample table is shown below sample table
My requirement is to get result in the below desired format for event_dim.name="notification_received" desired output
To get this desired output I execute the below query(standardSQL)
SELECT event.name
(SELECT param.value.string_value FROM UNNEST(event_dim.params) AS param WHERE param.key="notification_title") as notification_title,
(SELECT param.value.string_value FROM UNNEST(event_dim.params) AS param WHERE param.key="item_id") as item_id
FROM `projectID.com_dev_sambhav_ANDROID.app_events_20*`, UNNEST(event_dim) as event
WHERE event.name = "notification_received"
But I got this error
Error: Each function argument is an expression, not a query. To use a query as an expression, the query must be wrapped with additional parentheses to make it a scalar subquery expression.
can anybody help me get out of this problem