I am using redshift
I have a table like this : metric is a super type, built with the array() function within redshift
user | metrics |
---|---|
red | array(2021, 120) |
red | array(2020, 99) |
blue | array(2021, 151) |
I would like to do : select user, max(metrics) from table group by user
and get this :
user | metrics |
---|---|
red | array(2021, 120) |
blue | array(2021, 151) |
Sadly using this query, I only get null values
Do you know how to handle that ?
Thanks