去掉重复里程结算数据,笔记
DELETE FROM IOV_Settlement_Mileage WHERE VehId IN (select VehId from [IOV_Settlement_Mileage] group by VehId having count(VehId) > 1) AND SettlementTime 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'