How do you find the first and last value in a window?
SQLLevel: AdvancedWindow Functions Advanced
How do you find the first and last value in a window?
Hints
- Which rows belong to the partition and frame for each current row?
- Check ordering, ties, frame boundaries and the difference from GROUP BY.
Answer
This answer is part of mentoring
Advanced questions come with a full breakdown and a mock interview with a working quant researcher. The first call is free.
Source and licence: SQL Interview Questions — Arda Kocadoru · MIT