I have the following table:
ID user_id skill_id 1 8 1 2 8 3 3 2 3 4 5 3 5 2 1 6 5 2 7 5 4 8 5 5 9 8 5
When I do
SELECT COUNT(USER_ID) WHERE skill_id IN(1,3) I get a count of 3, which means it's giving me the users with any of them, I need the users who have all?
As a side note I think I could do this intersecting different queries but that would mean a separated query for each tag and there can be endless combinations of skills, something tells me there is a simpler way, speed is really important here.