Keep SQLtest alive: Help cover this month's $100 server costs to keep all lessons and the SQL playground online. Support the project →
SQL code copied to buffer
Task 16:

Highly Paid Employees

Firebird
Write a query that retrieves a list of all employees whose salary is higher than the salary of their department manager.
The result should contain the following columns: EMP_NO, FIRST_NAME, LAST_NAME - employee data, DEPARTMENT - the name of the department in which he works, SALARY - his salary, MANAGER_SALARY - department manager salary.
Sort the result by EMP_NO in default order.
Expected result Columns: 6 · Rows: 4
EMP_NO FIRST_NAME LAST_NAME DEPARTMENT SALARY MANAGER_SALARY

Write your query below and click "Check it!". Tables are described in the right pane.

The query result will appear here. Ctrl+Enter - Run query