Postgres provides a way to turn a column into an array. Samle query:
WITH
dataset AS (
SELECT '1' as a
union
SELECT '2' as a
union
SELECT '3' as a
)
SELECT
array(select a from dataset) as array_result;
returns
| array_result |
|--------------|
| {2,3,1} |
How to do the same with Presto SQL?