Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Quiz
10. Complex recursive CTE – trees
Summary

Instruction

Perfect! Now, let's tackle a more complex example of recursion.

Exercise

For each employee, show the following information: id, first_name, last_name, superior_id and the path from 'Boss' (person with NULL superior_id) to that employee.

The path should start with the word 'Boss' and contain the last names of all superiors. At the end of the path, there should be the last name of the employee in question. The last names in the path are separated with '->'.

Example: Boss->Smith->Kowalsky->Omer