with t as (
    select stu.sId
    from Student stu
    join (
        select sId, cId, score
        from SC
        group by sId, cId, score
    ) sc on stu.sId=sc.sId
    join Course c on sc.cId=c.cId
    group by stu.sId
    having avg(sc.score)>60
)
select count(*)
from t