sql查询每个班级前十个同学select from students a where 10> (select count() from students where classid = a.classid and rank > a.rank)