SQL array flattening: Why doesn’t CROSS JOIN UNNEST join every nested value with every row?
The best way to think about this is by looking at what happens on a row-by-row basis. Setting up some input data, we have: (I’m using a third element for the second row to make things more interesting). If we just select from it, we get output that looks like this: Now let’s talk about … Read more