关键字PARTITION BY
自己看代码喽~
SELECT * FROM ( SELECT ROW_NUMBER() OVER (PARTITION BY ClassType ORDER BY Score DESC) rowid, ClassType, Name, Score FROM dbo.CAMAIN ) TT WHERE TT.rowid <= 5;