select *from ( SELECT t.s#,---学号 t.c#,---课程号 T.SCCORE, ---成绩 RANK() OVER(PARTITION BY t.c# ORDER BY t.sccore DESC ) AS rk, FROM scc t) mm where rk<=1