Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Above Department Average Salary

Return the name, department and salary of employees who earn strictly more than the average salary of their own department. Order by name.

Table schema

Employees(id INT PRIMARY KEY, name VARCHAR(10), dept VARCHAR(10), salary INT)

Sample data

id | name | dept | salary
1 | Asha | IT | 90
2 | Ben | IT | 60
3 | Chi | HR | 50
4 | Dev | HR | 70
5 | Eli | HR | 60

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.