How do you find the Nth highest salary?
SQLLevel: AdvancedTricky Queries
How do you find the Nth highest salary?
Hints
- Define one output row and the source-table keys.
- Check duplicates, NULLs and the order of filtering and aggregation.
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