How to "flatten" multiple rows with same ID (Oracle 11g) by concatenating **multiple** fields per row?

by nutty about natty   Last Updated August 14, 2019 10:06 AM

I'm connected to an Oracle Database (11g Release 2 -

I'd like to "flatten"/"merge" all rows with the same ID, pretty much as is well delineated here:

enter image description here

However, in this example the "concatenation" is applied only to one field/column; I'd want to apply it to several fields/columns.

Also, I'd only want to concatenate unique/distinct entries (in the above example that would be

P002 | CA003

instead of the duplication

P002 | CA003,CA003

Related links:

Eliminate duplicates in ListAgg (Oracle)

Related Questions

Convert Concat's datatype to varchar

Updated October 04, 2018 13:06 PM

Group stored procedures in oracle

Updated May 14, 2018 15:06 PM