SQL window frame clause: ROWS vs RANGE, when to use each, and the duplicate-peers trap with RANGE
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks what the frame clause of a SQL window function controls and how ROWS and RANGE frames choose rows. Tests running totals over tied ORDER BY values, the default frame, date-based rolling windows, and keeping window results deterministic.