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 -

reflection - How to access the object-members of an object declaration in kotlin -

php - Doctrine Query Builder Error on Join: [Syntax Error] line 0, col 87: Error: Expected Literal, got 'JOIN' -