Question: What does this code do ? 5 6 7 8 3 4 2 1 SELECT e . employee _ id , e . first _

What does this code do?
56783421
SELECT e.employee_id, e.first_name, e.last_name, e.salary
FROM employees e
WHERE e.salary >(
SELECT AVG(salary)
FROM employees
WHERE department_id = e.department_id
);
1 point
It finds employees who earn more than the average salary in their department.
It calculates the average salary for all employees.
It groups employees by department.
It joins the employees table with itself.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!