plsql - Combine Rows output for multiple column checks -


i want combine multiple rows single 1 based on multiple column checks. enter image description here

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

enter image description here


Comments

Popular posts from this blog

java - nested exception is org.hibernate.exception.SQLGrammarException: could not extract ResultSet Hibernate+SpringMVC -

sql - Postgresql tables exists, but getting "relation does not exist" when querying -

asp.net mvc - breakpoint on javascript in CSHTML? -