What are the department ids for departments with employees who have the letter T in their first name?
select department_id from employees where first_name like '%t%'
Who are the employees in those departments?
select * from employees where department_id in ( select department_id from employees where first_name like '%t%' )
What are their ids and full names?
select employee_id, first_name, last_name from employees where department_id in ( select department_id from employees where first_name like '%t%' )