Window functions
Calculate across related rows without collapsing the result.
- 01Rank current salarieshard
Rank employees by current salary from highest to lowest. Return employee id, salary, and rank; sort by rank then employee id.
- 02Largest order totalshard
Show the three largest order totals with order id, total amount, and rank. Resolve ties by order id and return exactly three rows.