How do you carry the last value forward (LOCF) to fill gaps in a time series with SQL window functions?
Role: Data Scientist
Category: Data Manipulation (SQL/Python)
Difficulty: medium
Interview Round: Other
Overview: Asks how to fill NULL gaps in a time series by carrying the last observed value forward using SQL window functions. Tests window function frames, partitioning by series, handling of ties and leading NULLs, and awareness of engine-specific options such as IGNORE NULLS.