Say I have a table:
Restaurant locations: RESTAURANT_NO | RESTAURANT_LOCATION ----------------------------------- 1 | City A 1
SELECT DISTINCT Restaurant_no FROM TableX t WHERE NOT EXISTS ( SELECT * FROM TableX c WHERE c.Restaurant_no = t.Restaurant_no AND c.Restaurant_location = 'City C' )