Y
yamazakeh
Unregistered / Unconfirmed
GUEST, unregistred user!
sorry,刚才发的写错了点点
select * from
(
select 姓名, 总成绩, 名次=(select count(distinct 总成绩)+1 from 表 where 总成绩>t.总成绩)
from (select 姓名, sum(成绩)as 总成绩 from 表 group by 姓名) t
)a
where a.名次 between 10 and 20
select * from
(
select 姓名, 总成绩, 名次=(select count(distinct 总成绩)+1 from 表 where 总成绩>t.总成绩)
from (select 姓名, sum(成绩)as 总成绩 from 表 group by 姓名) t
)a
where a.名次 between 10 and 20