select count(*)
from
(select h2.sname,sum(score)/3 as avg_score
from
(select sId,cId,score
from SC
) as h1
left outer join
(
select sId,sname
from Student
) as h2 on h1.sId=h2.sId
left outer join
(
select cId,cname
from Course
) as h3 on h1.cId=h3.cId
group by h2.sname
) as h
where h.avg_score>60