Yurttas/PL/DBL/oracle/F/01/Company-B/q09.sql
1REM
2REM q09.sql
3REM
4REM Find all employees who earn more than the
5REM average salary of all employees of their company.
6REM
7
8SELECT W1.employeename
9FROM Works W1
10WHERE salary > (SELECT AVG(W2.salary)
11 FROM Works W2
12 WHERE W1.companyname = W2.companyname);