delete from FOODDETAIL t
where t.id in (select t.id from FOODDETAIL where t.sendtime>=to_date('2013-08-24','yyyy-mm-dd HH24:mi:ss') group by t.id having count(t.id) > 1 )
and rowid not in (select min(rowid) from FOODDETAIL where t.sendtime>=to_date('2013-08-24','yyyy-mm-dd HH24:mi:ss') group by t.id having count(t.id )>1)