You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

10 lines
376 B
SQL

/*Write a query to display the employee number and name( first name and last name ) for all employees who work in a department with any employee whose name contains a T.
*/
SELECT employee_id, first_name, last_name
FROM employees
WHERE department_id IN
( SELECT department_id
FROM employees
WHERE first_name LIKE '%T%' );