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 -

performance - Why is XCHG reg, reg a 3 micro-op instruction on modern Intel architectures? -

jquery - Responsive Navbar with Sub Navbar -