用例相当简单。在 postgres 中,我可以将 a 中的值聚合GROUP BY
到一个数组中:
select
customer,
array_agg(product_name) as items
from transactions
group by customer
customer items
-----------------------------------------------------------
john [salad, pizza, beer, diapers, pasta, cheese]
joe [cheese, beef, yoghurt, milk, water]
在 Exasol 中,从聚合函数的文档页面中,我只能看到将上面的GROUP_CONCAT
所有值合并items
为逗号分隔的字符串。
是否可以在适当的数组而不是字符串中获取这些值?