Standard SQL
Hey everyone,
I have a big query table that approximately look like this
team_id, channel_id, value_1, value_2,...
A 1111 xxx yyy
B 1111 xxx yyy
C 2222 uuu vvv
D 2222 uuu vvv
E 3333 grr sss
So as you can see, currently, everything is indexed by team_id while all the data that has the same channel_id is same. I need the data to be indexed by channel_id. The result should look like this:
team_id, channel_id, value_1, value_2,...
[A,B] 1111 xxx yyy
[C,D] 2222 uuu vvv
[E] 3333 grr sss
Such that rows with same channel ID are reduced to one row, but the team_id is merged into an array. Is this possible? I am still quite new to SQL/BigQuery and don't know how to do this. I would be happy for some help!
Big thank in advance!