1.sql 去重复
DELETE from table1 where Id not in(select * from(SELECT Id from table1 GROUP BY lasttime) t)
2.int型日期转换成datetime
cast(CONCAT(SUBSTR(ldate,1,4),'-',SUBSTR(ldate,5,2),'-',SUBSTR(ldate,7,2)) as DateTime)