Org charts with recursive WITH · exercise 1 of 1 · free preview
A recursive WITH RECURSIVE has two parts joined by UNION ALL: a starting query, and a second query that joins the table to the rows found so far. It repeats until no new rows appear. Here each employee has a manager_id that points to another row of the same table.
List the name of everyone who reports to Noor Aziz (emp_id 3), directly or indirectly, without Noor herself. Order by name.
Tables in this practice company
departmentsemployees