I am trying to find an SQL query that will return a list of items in column X that only appear once, or more precisly only have 1 corresponding Y (X is key). For example:
Table (R):
X | Y
-----
0 a
1 a
1 b
2 c
2 d
2 e
In this case, I would expect to only get back "0" because it only has one corresponding Y value (a), whereas "1" has two (a & b) and "2" has 3 (c & d & e) ... etc....
Any help would be greatly appreciated...
Thanks,