PRESTO SQL: 如何从多条记录中获取最大日期?

PRESTO SQL: How to get max date from multiple records?

我正在尝试获取最大日期也是从 unix 时间转换而来的记录...谢谢:

我想你想要:

select t.*, from_unixtime(unix_time) as converted_time
from (select t.*, row_number() over (partition by item_id order by unix_time desc) as seqnum 
      from t
     ) t
where seqnum = 1;