Working in Trino (aka Presto). I have a table of data that's structured like so:
| company_id | company_name | related_companies |
|---|---|---|
| xy12345 | Cool Company | [{company_id=we23456,type=PARTNER},{company_id=tr45678, type=PARTNER},{company_id=fu76354,type=PARTNER}] |
The related_companies field is of type list<struct<company_id: string, type: string>>
How can I structure my query to get the output to result in:
| company_id | company_name | related_companies |
|---|---|---|
| xy12345 | Cool Company | we23456, tr45678, fu76354 |