How to structure this query...?
- by SpikETidE
Hi Everyone...
Consider the following table....
hotel facilities
1 internet
1 swimming pool
1 wi-fi
1 parking
2 swimming pool
2 sauna
2 parking
3 toilets
3 bungee-jumping
3 internet
4 parking
4 swimming pool
I need to select only the hotels that have parking, swimming pool and internet....?
I worked out the following....
SELECT hotel
FROM table
WHERE facilties IN(internet, swimming pool, parking)
This query selects the hotels that has atleast one among the choices.
But what i need is a query that selects the hotels that has ALL of the selected facilities...
Thanks for your suggestions....