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

Join Shalyam Newsletter

Get exclusive insights with every issue: education, research and innovation news.

One email a week. Unsubscribe any time.