plsql - Combine Rows output for multiple column checks -
i want combine multiple rows single 1 based on multiple column checks.
only if remaining columns match program_type should merged comma separated.
i tried using listagg unable achieve . tried using connect still not able check conditions.
any on same.
regards.
something
select listagg(program_type,',') within group ( order program_type desc ) prog_group emp
output:
xyz,mno
further if want have columns in single query
with program1_type ( select distinct id,prog_type ( select id,listagg(program_type,',') within group ( order program_type desc ) on (partition id ) prog_type emp ) )select distinct e.id,e.name,prog_type program_type, e.mname,e.type --add remaining columns here program1_type p,emp e p.id=e.id
o/p -screenshot
Comments
Post a Comment