Departments Above the Company Average Salary
Medium
Derived Tables
Return departments whose average salary is higher than the average salary of the whole company (all employees).
Table schema
Employees(id INT PRIMARY KEY, dept VARCHAR(10), salary INT)Sample data
id | dept | salary
1 | IT | 90
2 | IT | 70
3 | HR | 40
4 | HR | 50
5 | Ops | 60
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.