Re:Strange line of Python
by buro9 on Friday November 18, 2011 @07:30AM
(#3251515)
It reminded me of the SQL double NOT EXISTS:
SELECT DISTINCT store_type
FROM stores
WHERE NOT EXISTS (
SELECT *
FROM cities
WHERE NOT EXISTS (
SELECT *
FROM cities_stores
WHERE cities_stores.city = cities.city
AND cities_stores.store_type = stores.store_type
)
);