查询score中选学多门课程的同学中分数为非最高分成绩的记录。

时间:2023-01-08 08:25:22

20、查询score中选学多门课程的同学中分数为非最高分成绩的记录。

 

select * from score a where sno in (

select sno from score group by sno having count(1)>1)

and a.degree<(select max(degree) from score b where a.cno=b.cno  )

 查询score中选学多门课程的同学中分数为非最高分成绩的记录。