每个班的前10名的MySQL 查询方法

 

  1. select a.class,a.score
  2.  
    from student a
  3.  
    where (select count(*) from student where class=a.class and a.score<score)<3
  4.  
    order by a.class,a.score desc;
  5.  
原文地址:https://www.cnblogs.com/wangchao422/p/9484740.html