表:
id(编号)
name(名称)
chengji (成绩)
classname(课程)
#--查询成绩最高的两位人的成绩
select chengji ,name from student ORDER BY chengji DESC LIMIT 2;
#--查询每科最高两位成绩的人
select distinct t1.* from student as t1 where (select COUNT(chengji) from student AS test where classname = t1.classname and test.chengji>t1.chengji)<2 ORDER BY chengji DESC