Save up to $499! Grab all Python courses for $49 or all online courses we’ve ever launched for only $169. Only Feb 11-16. Happy Valentine's!
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