How do you debug a long CTE chain?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how to debug a long chain of SQL common table expressions that produces wrong results. Tests a stage-by-stage approach, row count and grain checks, how to find join fan-out and dropped rows, and when to read the query plan.