SQL Interview Questions by Skill Arbitrage
SQL Interview Questions by Skill Arbitrage
7. Window functions?
- ROW_NUMBER(): Number each row.
- RANK(): Assign ranks with gaps for ties.
- DENSE_RANK(): Similar to rank, but no gaps.
- LEAD()/LAG(): Get data from the next/previous row.