select 字段1,字段2 from
(
select 字段1,字段2 ,rank() over (partition by 字段1,字段2 order by 时间字段 desc ) row_num
from table)
where row_num=1