查询各班成绩的第一名,降序排列
select stu_name, class_id, score
from Stu Stu1 where score in (
select top 1 score from Stu Stu2
where Stu1.class_id = Stu2.class_id
order by score desc)
查询各班成绩的第一名,降序排列
select stu_name, class_id, score
from Stu Stu1 where score in (
select top 1 score from Stu Stu2
where Stu1.class_id = Stu2.class_id
order by score desc)