Same Department Same Salary Pairs
Medium
Pairing & Matching Queries
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.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.