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

Popular posts from this blog

Is there a better way to structure post methods in Class Based Views -

Python Tornado package error when running server -

Qt QGraphicsScene is not accessable from QGraphicsView (on Qt 5.6.1) -