解决方案: 1.分组查询最大时间的数据 例: select a.code,max(a.time) as time from table a GROUP BY a.code desc; 转载于:https://www.cnblogs.com/zhouheblog/p/11177090.html