#57

Three Highest Salaries by Department

HR is preparing a top-earner report for department heads: in every department find the employees whose salary is among the three highest distinct salaries of that department. Output the department name, employee name, and salary; sort by department, then by salary descending.

Expected output sample

This is what a correct answer looks like — its row count is its own, it doesn't have to match the schema tables.

namesalarydepartment_name
Alice95000Engineering
Bob90000Engineering
Eve80000Engineering

Your query result will appear here