I think I found the answer to my question, I\'m just unsure of the syntax, I keep getting SQL errors.
Basically, I want to do the opposite of IN. Take this example:<
You'll need to check for the existence of two rows, rather than being able to do a simple IN
(which will only check the values within each joined record). Maybe something like:
SELECT *
from users
WHERE EXISTS (SELECT NULL FROM tags WHERE tags.user_id = users.id AND tags.name = 'tag1')
AND EXISTS (SELECT NULL FROM tags WHERE tags.user_id = users.id AND tags.name = 'tag2');