select temp.ciId, wm_concat(temp.stuName)
from (select pc.ci_id ciId,
instr(pc.stu_ids, ps.stu_id),
ps.stu_name stuName
from pm_ci pc, pm_stu ps
where instr(pc.stu_ids, ps.stu_id)<0
order by 1,2) temp group by .
select t.cou_id,max(t.stu_name)
from
(
select c.cou_id, wm_concat(s.stu_name) over(partition by c.cou_id order by s.stu_id) stu_name
from course c, student s
where instr(c.stu_id, s.stu_id) > 0
)t
group by t.cou_id