Pergunta de entrevista da empresa Meeshop

Recursive CTE question and SQL query.