Time Series SQL Quant Interview Guide
Time series SQL quant interview guide for timestamps, ordering, lag, rolling windows, as-of logic, leakage, and examples.
Candidates querying market, experiment, or event-time tables.
Time-series SQL starts with ordering
Timestamped data must be ordered correctly before lag, rank, rolling, or latest-row logic. The order column should match decision time.
Point-in-time joins matter
A feature joined to an event should have been available at that event time. Standard equality joins can leak future data if timestamps are mishandled.
Concrete example
To attach the latest price before each trade, use an as-of style join or window logic that selects prices with timestamp less than or equal to the trade time.
Rolling windows need clear boundaries
A trailing window should exclude future rows and may need to exclude the current row depending on the metric definition.
Common mistakes
Candidates often group by date too early and lose event ordering. Keep raw timestamps until the time logic is correct and validated.
Practice the pattern
Use the LeetQuidity curriculum and calibration to turn this topic into a focused practice plan.