每个班的前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.  
posted @ 2018-08-15 23:45  砥砺奋进的几年  阅读(2626)  评论(0编辑  收藏  举报