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

What is happening when Matlab is starting a "parallel pool"? -

php - Cannot override Laravel Spark authentication with own implementation -

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