delete where ScoreId not in (select max(ScoreId) from dbo.Score group by [Name], Score, GroupId, IP) 删除冗余的行数就是一个删除,然后用分组查寻出不是冗余的,然后再删除