直接用排序就行了、最上面一条就是最大的、然后依次排列、最下面就是最小的select 资产号,时间戳 from tabname order by 时间戳 desc
select 资产号,max(时间戳)from tabnamegroup by 资产号