delete from t where [id] in ( select [id] from t where a in (select a from t group by a,b,c,d having count(*)>1) and [id]<> (select min(id) as minid from t group by a,b,c,d having count(*)>1) )
更正: delete from t where t.id not in (select min(id) from t group by t.a,t.b,t.c,t.d)