Many developers think that correlated subquires are not efficient.
SELECT e.last_name, e.department_id, e.salary FROM employees e
WHERE e.salary> (SELECT AVG(salary) FROM employees where
department_id=e.department_id );
SQL_ID 3jr7194pfhh3s, child [...]