#8 most askedVery commonHardWindow functions
Top 3 Salaries in Each Department
π’ Asked in real interviews
No reports yet. Were you asked this? Be the first to say where.For each department, return the employees whose salary is among the top 3 distinct salaries in that department: department, employee, salary.
π§ͺ Practice
Write the query, then press Run tests to compare your rows with the expected result.
SELECT * FROM employees;
Output appears here. Press Run or Ctrl/β + Enter.
Try it first. Struggling for a few minutes is how it sticks.