And before you ask, let's show one more simple variation on that:
Code:
SELECT vendorName
FROM Vendors
WHERE vendorID IN (
SELECT O.VendorID
FROM Orders AS O, Customers AS C
WHERE O.customerID = C.customerID
AND C.State IN('WA','OR','CA') )
AND vendorID NOT IN (
SELECT O.VendorID
FROM Orders AS O, Customers AS C
WHERE O.customerID = C.customerID
AND C.State IN ('ME','NH','VT','MA','CT','RI') )
That gets all vendors who have sold in the 3 West Coast states but have never sold to any state in New England. Okay? You can see there are lots of ways to vary this.