I have a following result set:
request_id | p_id
66 | 10
66 | 10
66 | 10
66 | 22
66 | 22
76 | 23
76 | 24
I am trying to select rows that excludes
records with certain combination values:
request_id | product_id
66 | 10
76 | 23
So the output result set should contain only these records:
66 | 22
66 | 22
76 | 24
I tried doing:
select * from `table`
where request_id NOT IN (66, 76) AND product_id NOT IN (10, 22)
But this gives me empty resultset.
How do I exclude just the combination of those two values?