DELETE FROM IOV_Settlement_Mileage WHERE VehId IN (select VehId from [IOV_Settlement_Mileage] group by VehId having count(VehId) > 1)ANDSettlementTime NOT IN (select min(SettlementTime) from [IOV_Settlement_Mileage] group by VehId having count(VehId)>1) AND DataDate BETWEEN '2018-12-18 00:00:00' AND '2018-12-18 23:59:59'