I’ve spent the last hour googleing and trawling stackoverflow without result, so I’m wondering if anyone here is good with crosstab queries.
I have a table(well view) with
packagid | version | compiler | platform |
---|---|---|---|
ADUG.BasicLib | 1.0.24 | 11 | 1 |
ADUG.BasicLib | 1.0.24 | 11 | 2 |
ADUG.SuperLib | 1.0.0 | 11 | 1 |
ADUG.SuperLib | 1.0.0 | 11 | 2 |
ADUG.SuperLib | 1.0.0 | 11 | 3 |
and I want to transform it to
packagid | version | compiler | platforms |
---|---|---|---|
ADUG.BasicLib | 1.0.24 | 11 | 1,2 |
ADUG.SuperLib | 1.0.0 | 11 | 1,2,3 |
Every crosstab example I have found is about creating columns from rows, but in my case I want to create a single column (platforms) with the concatenated values from the platform column.
I’m using Postgresql but examples with other db’s welcome - it might still help me find the equiv feature for postgres.