db2 - SQL Query to concat duplicated row -
let's have table 3 columns following values
| | b | c | | a1| b1| c | | | b | c1| _____________
i'd make query
a | b | c, c1| a1| b1| c|
to distinct first & second column. appreciated
need use listagg..
select cola, colb, listagg(colc, ', ') within group(order colc) colc mytable group cola, colb
Comments
Post a Comment