Mysql 获取年级每个班前十学生的信息

select *
from Table1 a
where 10>(select count(*) from Table1 where ClsNo=a.ClsNo and Score>a.Score)
order by a.ClsNo,a.Score desc

 

posted on 2016-10-18 10:12  多多明明  阅读(302)  评论(0编辑  收藏  举报