Mirchi interview question

recursive cte, cte , window function