This is a very basic query I can\'t figure out....
Let\'s say I have a two column table like this:
userid | roleid --------|-------- 1 | 1
Assuming userid, roleid are contained in a unique index (meaning there cannot be 2 records where userid = x and roleid = 1
select count(*), userid from t where roleid in (1,2,3) group by userid having count(*) = 3