SQL Practice

Window functions

Calculate across related rows without collapsing the result.

  1. 01Rank current salaries

    Rank employees by current salary from highest to lowest. Return employee id, salary, and rank; sort by rank then employee id.

    hard
  2. 02Largest order totals

    Show the three largest order totals with order id, total amount, and rank. Resolve ties by order id and return exactly three rows.

    hard
← All practice topics