天天看點

sql學生表 班級學生表 查出所有班級學生大于90分的個數大于10的班級

stu(id,name)

cla-stu(stuid,claid)

sco(stuid,score)

select claid from cla-stu where =
and stuid in (
    select stuid from sco where score>)
group by claid having count(stu)>
           
sql