select event_name,ep.key,count(*) from 'foyer-work.analytics_349412478.events_20231129' cross join unnest(event_params) as ep group by 1,2
correct this query
Certainly! Based on your query, here's the corrected version:
SELECT event_name, ep.key AS event_parameter, COUNT(*) AS event_count FROM `foyer-work.analytics_349412478.events_20231129`, UNNEST(event_params) AS ep GROUP BY event_name, ep.key
In this corrected version:
AS
to provide aliases for the selected columns in the SELECT
statement.AS
keyword to give the alias "event_parameter" to the ep.key
column.COUNT(*)
expression.GROUP BY
clause to include event_name
and ep.key
.This syntax aligns with standard SQL conventions and should execute as intended. If you have any further questions or need additional assistance, feel free to ask!