select * from dba_role_privs where (GRANTED_ROLE='CONNECT' AND GRANTED_ROLE='PRESS');
select * from dba_role_privs where (GRANTED_ROLE='CONNECT' OR GRANTED_ROLE='PRESS')
select * from dba_role_privs t1 join dba_role_privs t2 on t1.GRANTED_ROLE='CONNECT' and t2.GRANTED_ROLE='PRESS'
select t.grantee
from (select grantee, count(grantee) as counts
from dba_role_privs
where grantee in
(select grantee
from dba_role_privs
where granted_role = 'PRESS'
and grantee in
(select grantee
from dba_role_privs
where granted_role = 'CONNECT'))
group by grantee) t
where t.counts = 2
select grantee
from dba_role_privs
group by grantee
having count(*)=2
and cast(collect(GRANTED_ROLE) as sys.ku$_vcnt) = sys.ku$_vcnt('CONNECT','RESOURCE')
select grantee
from dba_role_privs
group by grantee
having count(*)=2
and min(GRANTED_ROLE) ='CONNECT'
and max(GRANTED_ROLE) ='RESOURCE'