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