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

Department Payroll Cost

Return each department's total base salary, ordered by cost descending.

Table schema

Employees(id INT PRIMARY KEY, name VARCHAR(10), base INT, hours_worked INT, dept VARCHAR(5))

Sample data

id | name | base | hours_worked | dept
1 | Ann | 3000 | 170 | IT
2 | Bob | 2500 | 200 | IT
3 | Cy | 2000 | 160 | HR
4 | Dee | 4000 | 150 | HR

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.