Roommate Pairs
Return every pair of students who share a room (smaller id first), ordered by room then pair.
Table schema
Students(id INT PRIMARY KEY, name VARCHAR(10), room INT)Sample data
id | name | room
1 | Ann | 101
2 | Bob | 101
3 | Cy | 102
4 | Dee | 102
5 | Eli | 103
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.