On January 21th at 14:15 UTC , progression through exercises will be unavailable for 10 minutes due to a planned maintenance break.
Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
10. Complex recursive CTE – trees


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


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