delete t from tb t where exists(select 1 from tb where name=t.name and id<t.id)
delete t from tb t where id not in(select min(id) from tb where name=t.name)
delete a from tb a where (select count(1) from tb where Name=a.Name and ID<a.ID)>0
delete tb from tb t where id not in (select min(id) from tb where name = t.name and score = t.score) delete tb from tb t where id not in (select max(id) from tb where name = t.name and score = t.score)
t
from
tb t
where
exists(select 1 from tb where name=t.name and id<t.id)
t
from
tb t
where
id not in(select min(id) from tb where name=t.name)
delete tb from tb t where id not in (select min(id) from tb where name = t.name and score = t.score)
delete tb from tb t where id not in (select max(id) from tb where name = t.name and score = t.score)