Using the CROSS JOIN UNNEST() function to flatten arrays into single rows in BigQuery, using the Google Analytics sample BigQuery dataset. Learn more and grab the SQL cheat sheet at codingisforlosers.com/learn-b....
I think conceptually you misunderstood something. It's not that you can't reference 3 levels deep. It's about unnesting is for arrays. What you did @4:54 with referencing into the second level is because that's actually a struct. You can see that in the schema. REPEATED means Array, RECORD means struct. In general what happens though that you have an array of structs. I think that's why you came up with the idea that the 3rd level needs to be unnested. I'm just leaning big query as well. So correct me if I'm wrong :)
Hello Thank you for the course, i wanted to unnest traffic but the error message said it need to be a string. I wanted to know the difference between hits and traffic is because hits is repeated not nullable?