Hi,

Suppose I wish to list the departments who have locations in both London and Frankfurt, the simple solution to this would be

Select department
from deps
where city = 'London'
INTERSECT
Select department
from deps
where city = 'Frankfurt'

alternatively

Select d1.department
from deps d1, deps d2
where d1.department = d2.department AND
d1.city = 'London' AND d2.city = 'Frankfurt'

Personally I prefer the first method ( i think it is faster??), however my real concern is suppose the table was rather large and each department had locations in 15+ citys. I wouldn't expect a query to have 14+ intersects or a horrible join condition. How would I go about listing all department with cities in the following set (london, ... , frankfurt, ... etc) OR does this type of task never get done.

Cheers.