This question is a follow-up to this initial question.
In the previous example, we found how to filter an ARRAY of STRUCTs from Firebase's Analytics database.
Now here is the new challenge on top:
My thinking was, since we already did:
UNNEST(event_params) AS ep
This means that event_params is now flattened, so that means its values inside from the following ARRAYS:
- value.string_value: can access values;
- value.int_value: can access values;
- etc..
So my thinking goes, since I managed to access value.string_value = 'Restaurant profile', it should be no problem to also access the other value you can see in the example called "restaurant_id", so I add some more AND statements:
ep.key = 'restaurant_id' AND
ep.value.int_value = 2045881 AND
But as you can imagine since I'm posting about it, the result was not quite what was expected ?????? even though technically BigQuery did accept my solution:
Any idea what is wrong in my initial query and how I can fix it?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…