有这么几个关键字段,要求ItemName不能重复,如果有重复,就保留时间最大的那条记录。
可以参考这个https://blog.csdn.net/qq_28643437/article/details/83108498
select max(operatetime), ItemName from table group by ItemName