🚀 November has started! SQLtest.online stays free thanks to donations from people like you. Help us reach this month's goal early so the site keeps running without interruptions. Support now →
SQL code copied to buffer
Task 142:

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.

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