Skip to content
Advertisement

Counting events with a specified event.value.string_value in big query

This is a follow up question to this question I have a query:

Which returns:

enter image description here

I now want to update the query to only count those purchases that have

That event is stored like so:

enter image description here

I added:

Is this the correct way to count only those events that has a specified event_params.value.string_value?

I am not sure about the CROSS JOIN usage here, but that is the example I’ve seen to reach the event_params values and keys in order not to get this error:

Cannot access field value on a value with type ARRAY<STRUCT<key STRING, value STRUCT<string_value STRING, int_value INT64, float_value FLOAT64, …>>> at [3:20]

When using:

Advertisement

Answer

It could be faster with subquery:

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement