Reputation: 1
id | list |
---|---|
1 | {759-10,1147-7,931-10} |
2 | {719-10,117-2} |
id | list1 | list2 |
---|---|---|
1 | 759-10 | 931-10 |
2 | 719-10 | 117-2 |
Upvotes: 0
Views: 1659
Reputation: 1269803
If you just want the first and last elements, use array operations:
select id, list[1], list[cardinality(list)]
from t;
Here is a db<>fiddle.
Upvotes: 1