I have the following SQL that produces a list of values:
SELECT x / 100e0 FROM UNNEST(sequence(1, 100, 1)) t(x)
# | _col0 |
---|---|
1 | 0.01 |
2 | 0.02 |
3 | 0.03 |
... | ... |
100 | 1 |
I'm trying to aggregate the results to get an array of [0.01,0.02,0.03,,,,,1.0]
as follows without success, what am I missing?
SELECT array_agg(x / 100e0 FROM UNNEST(sequence(1, 100, 1)) t(x))
Error:
mismatched input 'FROM'. Expecting: ',', <expression>