I have a table recruiter
with columns company
and location
. I want to find all the distinct locations where there is at least one recruiter from each company in a list.
I can find all the locations where a recruiter from a given company works
SELECT DISTINCT location
FROM recruiter
WHERE company='Google'
but I want to do this for a bunch of different companies and get the intersection of them.
I found a previous question which seemed to ask something similar: Intersection of two select.
However, the question asks specifically about the intersection of the results of two SELECT
queries, and the answers don't seem to generalize to an arbitrary number.