SELECT DEPT, AVG(SALARY) FROM Q.STAFF GROUP BY DEPT HAVING AVG(SALARY) > (SELECT AVG(SALARY) FROM Q.STAFF) ] subquery