programming-examples/sql/SubqueriesHRDatabase/Write a query to display the employee name ( first name and last name ), employee id and salary of all employees who report to Payam.sql

9 lines
317 B
MySQL
Raw Normal View History

2019-11-18 14:05:53 +01:00
/*Write a query to display the employee name ( first name and last name ), employee id and salary of all employees who report
to Payam.*/
SELECT first_name, last_name, employee_id, salary
FROM employees
WHERE manager_id =
(SELECT employee_id
FROM employees
WHERE first_name = "Payam"
);