The input table contains the data to build a tree of employees. Each row represents one employee, identifying both the employee and his or her manager by identifier and name. The employee with no manager, Don, becomes the root of the tree. The other employees become children of their managers.
emp_id | emp_name | mgr_id | mgr_name |
---|---|---|---|
100 | Don | NULL | NULL |
200 | Pat | 100 | Don |
300 | Donna | 100 | Don |
400 | Kim | 200 | Pat |
500 | Fred | 400 | Kim |