I have a table called custrate using the following design and records.
Code:
custrate
custid rateid
1 120
1 200
2 130
2 300
3 121
3 200
4 131
4 300
5 122
5 200
6 132
6 300
7 120
8 130
9 121
10 131
Essentially custrate records should come in pairs, but the database I'm working on is messed up ([rateid 120-129 goes with rateid 200] AND [130-139 goes with 300]). What sql statement can I run inorder to select the custid of the records that are missing there corresponding X00 rate? I hope this is clear.
The custid's that should be returned are 7,8,9, and 10.
Thanks in Advance