Meeshop interview question

Recursive CTE question and SQL query.