【发布时间】:2022-12-01 10:46:56
【问题描述】:
所以我有一个命令,例如
SELECT something, string_agg(other, ';') FROM table
GROUP BY something HAVING COUNT(*)>1;
但我不知道如何将两列分开,因为它没有将 string_agg 视为一列。
这是我的原创
something | other |
--------+--------+
example | yes, no |
using | why, what |
我想要这个
something | other | new
--------+--------+------
example | yes | no
using | why | what
【问题讨论】:
标签: postgresql split