Postgresql GROUP_CONCAT equivalent?
Posted
by KnockKnockWhosThere
on Stack Overflow
See other posts from Stack Overflow
or by KnockKnockWhosThere
Published on 2010-04-01T14:09:53Z
Indexed on
2010/04/01
14:13 UTC
Read the original article
Hit count: 462
postgresql
|group-concat
I have a table and I'd like to pull one row per id with field values concatenated... In my table, for example, I have this:
TM67 | 4 | 32556
TM67 | 9 | 98200
TM67 | 72 | 22300
TM99 | 2 | 23009
TM99 | 3 | 11200
And, I'd like to output:
TM67| 4,9,72 | 32556,98200,22300
TM99 | 2,3 | 23009,11200
In MySQL, I was able to use GROUP_CONCAT, but that doesn't seem to work here... Is there an equivalent or another way to accomplish this?
© Stack Overflow or respective owner