users
id | name | age |
---|---|---|
1 | Randy | 30 |
2 | Steve | 40 |
3 | Lori | 50 |
phone_numbers
id | user_id | number | type | can_sms |
---|---|---|---|---|
1 | 1 | 5555555551 | Home | false |
2 | 2 | 5555555552 | Work | true |
3 | 3 | 5555555553 | Home | false |
4 | 2 | 5555555554 | Cell | true |
5 | 3 | 5555555553 | Home | true |
I'd like to find all users who have a phone numbers of type "Work" and "Cell". To be clear, I don't want the user if they have one and not the other. I just want the user record if they have both.
I want to find