185. Department Top Three Salaries
Use limit, offset, order by
together
The Employee
table holds all employees. Every employee has an Id, and there is also a column for the department Id.
1 | +----+-------+--------+--------------+ |
The Department
table holds all departments of the company.
1 | +----+----------+ |
Write a SQL query to find employees who earn the top three salaries in each of the department. For the above tables, your SQL query should return the following rows.
1 | +------------+----------+--------+ |
Soulution:
1 |
1 |