3 ms·
It reminded me of the SQL double NOT EXISTS: SELECT DISTINCT store_type FROM stores WHERE NOT EXISTS ( SELECT * FROM cities
by buro9 15y ago
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
)
);
- ghoul2 15y agofind the store_types such that at least one store of that type exists in at least one city? this is probably nerd sniping :(