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

Unmatched Rows on Either Side

List students who have no fee record and fee records that belong to no student. Return item and issue, ordered by item. (Emulate a FULL OUTER JOIN anti-match with UNION ALL.)

Table schema

Students(id INT PRIMARY KEY, name VARCHAR(20))
Fees(student_id INT, amount INT)

Sample data

Students
id | name
1 | Ann
2 | Bob
3 | Cy

Fees
student_id | amount
1 | 500
3 | 300
4 | 200

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.