내용

글번호 1235
작성자 허진경 (나자바바)
작성일 2023-09-01 11:28:14
제목 oracle 계층형 쿼리와 listagg 사용 예
내용 select e.lv, m.first_name as manager, listagg(e.first_name, ',') within group(order by e.first_name) as member from ( select employee_id, first_name, manager_id, level as lv from employees start with manager_id is null connect by prior employee_id=manager_id ) e join employees m on e.manager_id=m.employee_id group by e.lv, m.first_name order by e.lv;