Skip to main content
SQL Mid-level (2–5 yrs) Coding Very frequent SQL window functions RANK PARTITION BY CTE

Write a query using window functions to rank employees by salary within each department.

sql-mid-002

Your answer

Answer as you would in a real interview — explain your thinking, not just the conclusion.

Log in to save progress.