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
Hope below Oracle query will work.
Select First_column,LISTAGG(second_column,',') WITHIN GROUP (ORDER BY second_column) as Sec_column, LISTAGG(third_column,',') WITHIN GROUP (ORDER BY second_column) as thrd_column FROM tablename GROUP BY first_column