What is the average salary across all employees?
select avg (salary) from employees
Which employees make more than that?
select * from employees where salary > ( select avg (salary) from employees )
Of those, which work in departments with employees who have the letter J in their first name?
select * from employees where salary > ( select avg (salary) from employees ) and department_id in ( select department_id from employees where first_name like '%j%')
What are their ids, full names and salaries?
select employee_id, first_name, last_name, salary from employees where salary > ( select avg (salary) from employees ) and department_id in ( select department_id from employees where first_name like '%j%')