When would you use a recursive CTE for hierarchies, graph traversal or generating series?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks when a recursive CTE is the right SQL tool and how it applies to org-chart hierarchies, graph traversal and generated date or number series. Tests whether you understand the anchor and recursive members, how the recursion terminates, and how to guard against cycles.