계층 쿼리
회사 recursive 절을 보다가 공부해봄. CREATE TABLE employees ( id INT PRIMARY KEY, name TEXT, manager_id INT REFERENCES employees(id) ); INSERT INTO employees VALUES (1, 'CEO', NULL), (2, 'Manager A', 1), (3, 'Manager B', 1), (4, 'Employee 1', 2), (5, 'Employee 2', 2), (6, 'Employee 3', 3), (7, 'sEmployee ', NULL), (8, 'sEmployee A', 7), (9, 'sEmployee B', 7), (10, 'sEmployee 1', 4), (11, 'sEmployee 2', 4),..
2023. 10. 3.