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

Same Department Same Salary Pairs

Return pairs of employees in the same department earning exactly the same salary, smaller id first.

Table schema

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

Sample data

id | name | dept | salary
1 | Ann | IT | 50
2 | Bob | IT | 50
3 | Cy | IT | 60
4 | Dee | HR | 50
5 | Eli | HR | 50
6 | Fay | HR | 70

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.