I have a join table named languages_services
that basically joins the table services
and languages
.
I need to find a service that is able to serve both ENGLISH (language_id=1)
and ESPANOL (language_id=2)
.
table languages_services
------------------------
service_id | language_id
------------------------
1 | 1
1 | 2
1 | 3
2 | 1
2 | 3
With the data provided above, I want to test for language_id=1 AND language_id=2
where the result would look like this
QUERY RESULT
------------
service_id
------------
1
Obviously it doesn't return the one with service_id=2 because it doesn't service Espanol.
Any tips on this is greatly appreciated!