delete c_userfee as a from c_userfee as a, ( select *,min(id) from c_userfee group by feetime,account having count(1) > 1 ) as b where a.feetime = b.feetime and a.account=b.account and a.id > b.id;