well what you are describing is WHERE NOT EXISTS(subquery)
http://dev.mysql.com/doc/refman/5.0/en/exists-and-not-exists-subqueries.html
let me know if thats not what you want.
also why dont you just change the logic of your statement to go from
WHERE drinker NOT IN (drinker) to WHERE IN(drinker=null)
INITIAL QUERY.. formatted so its easier to read
SELECT
DISTINCT f2.drinker
FROM frequents f2
WHERE f2.drinker NOT IN
(
SELECT
f1.drinker
FROM frequents f1
WHERE (f1.bar,f1.drinker) NOT IN
(
SELECT
f.bar,
f.drinker
FROM frequents f,
serves s,
likes l
WHERE l.beer=s.beer AND f.bar=s.bar AND f.drinker=l.drinker
)
)
what you should be able to do is this
SELECT
DISTINCT f2.drinker
FROM frequents f2
WHERE f2.drinker IN
(
SELECT
f1.drinker
FROM frequents f1
WHERE f1.drinker IS NULL AND (f1.bar,f1.drinker) IN
(
SELECT
f.bar,
f.drinker
FROM frequents f,
serves s,
likes l
WHERE l.beer=s.beer AND f.bar=s.bar AND f.drinker=l.drinker AND f.drinker IS NULL
)
)
hopefully this works, i can't really test it. but the idea is instead of saying where this is not in this
say where this is in this where id (in subquery) is null
.