programming-examples/sql/SubqueriesHRDatabase/Write a query to display the employee name( first name and last name ) and department for all employees for any existence of those employees whose.sql
2019-11-18 14:05:53 +01:00

10 lines
346 B
SQL

/*Write a query to display the employee name( first name and last name ) and department for all employees for any existence
of those employees whose salary is more than 3700.
*/
SELECT first_name, last_name, department_id
FROM employees
WHERE EXISTS
(SELECT *
FROM employees
WHERE salary >3700 );