Meeshop Interview Question

Recursive CTE question and SQL query.