delete from A_TO_NOW where yuan_name in
(select yuan_name from A_TO_NOW group by yuan_name having count(yuan_name) > 1)
and rowid not in (select min(rowid) from A_TO_NOW group by yuan_name having count(yuan_name )>1)
delete from A_TO_NOW where yuan_name in
(select yuan_name from A_TO_NOW group by yuan_name having count(yuan_name) > 1)
and rowid not in (select min(rowid) from A_TO_NOW group by yuan_name having count(yuan_name )>1)