What are common pitfalls with SQL window functions: NULLs, frame defaults and ROW_NUMBER() ties?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks for the common correctness pitfalls in SQL window functions, from ROW_NUMBER results on tied rows to implicit frame defaults and NULL handling. Tests whether you can explain RANGE versus ROWS frames, deterministic ordering, and how NULLs behave in partitions, sorting and LAG or LEAD.