delete from proj_info where newcode in (select newcode from proj_info group by newcode having count(newcode) > 1) and NID not in (select min(nid) from proj_info group by newcode having count(newcode)>1)