Aggregate column from group by into ARRAY

Short question, couldn’t find anything and didn’t want to open an issue for this on github yet.

Is it already possible to convert the columns in a group by clause to a single array?

So something like

select to_array(col1), col2 from table group by col2

Hi @wzrdtales,

Welcome back to Cockroach Forums!

Currently the to_array (or array_agg) function is not supported by CockroachDB. Please open a GitHub issue and add a feature request so the Product team to can consider it for a future release. It is particularly helpful for the team to know how you would like to use this feature.

Thanks for your feedback!

Regards,
Florence
Technical Support Engineer