1

I have column that is returning from my query that is an array of array. It looks like this.

array_vals: {{NULL,NULL,147.89,87.27,82.65,83.41,93.69,101.90,NULL,NULL}}

When I try to query in to my array first array I always get Null values.

select array_vals[0] from table

This returns null. But my desired results would be {NULL,NULL,147.89,87.27,82.65,83.41,93.69,101.90,NULL,NULL}

with test as (
select 1 as value, array_agg(array[1 , 3, 4]) as data
group by value
)

select data[1] from test

This returns null for me.

Pat Doyle
  • 384
  • 2
  • 5
  • 16
  • 1
    [PostgreSQL multidimensional arrays](https://stackoverflow.com/questions/34403844/postgresql-multidimensional-arrays) – Lukasz Szozda Feb 25 '21 at 16:47

0 Answers0