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.

12 lines
374 B

/*Write a query to identify all the employees who earn more than the average and who work in any of the IT departments.
SELECT last_name
FROM employees
WHERE department_id IN
(SELECT department_id
FROM departments
WHERE department_name LIKE 'IT%')
AND salary >
(SELECT avg(salary)
FROM employees);