select a.sid , sum(score) from (select sid from student where classid = 1 and name like '王%&(9425)#39;) a , 成绩表 b where a.sid = b.sid group by a.sid order by DESC limit 3;