programming-examples/sql/JoinHRDatabase/7. Write a query in SQL to display the first and last name and salary for those employees who earn less than the employee earn whose number is 182.sql
2019-11-18 14:05:53 +01:00

7 lines
310 B
SQL

/*7. Write a query in SQL to display the first and last name and salary for those employees who earn less than the employee
earn whose number is 182.*/
SELECT E.first_name, E.last_name, E.salary
FROM employees E
JOIN employees S
ON E.salary < S.salary
AND S.employee_id = 182;