select top 1 from ( select sum(grade) from sc group by sid order by desc) -top 1 from (select sum(grade) from sc group by sid order by asc)