Pitfalls of recursive CTEs: recursion limits, UNION ALL vs UNION, and the single self-reference rule
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks for the limitations and common pitfalls of recursive CTEs in SQL, including recursion limits, the choice between UNION ALL and UNION, and the restrictions on the recursive member. Tests how well you understand recursive evaluation, cycle handling and the differences between database engines.