select distinct s from sc a where not exists(select 1 from sc where s='s3' and c not in (select c from sc b where a.s=b.s))
--try select s from sc where exists (select 1 from sc,(select c,count(*) as ccount from sc where s='s3' group by c) Tc where c=Tc.C and having cont(*)=TC.ccount) )
select s from sc where c in (select c from sc where s='s3') group by s having count(s)=(select count(c) from sc where s='s3')
select distinct s from sc A where s in (select s from sc where s='s3' and c not in(select c from sc B where A.s=B.s))
where not exists(select 1 from sc where s='s3' and c not in
(select c from sc b where a.s=b.s))
select s
from sc
where exists
(select 1 from sc,(select c,count(*) as ccount
from sc where s='s3'
group by c) Tc
where c=Tc.C and having cont(*)=TC.ccount)
)
where c in (select c from sc where s='s3')
group by s having count(s)=(select count(c) from sc where s='s3')
where s in (select s from sc where s='s3' and c not in(select c from sc B where A.s=B.s))