I have a table like below with columns A (string) and B ROW(int):
A B
a [1,2,3]
b [0,0,5]
c [3,1,4]
And I would like to split the second column (which contains a ROW type) into multiple columns this way:
A B1 B2 B3
a 1 2 3
b 0 0 5
c 3 1 4
I believe this can be done with a SQL statement, but unnest will create new rows (which I don't want) and split_part does not work with the ROW type. How can I achieve this?