1
votes

I'm trying to get the records with the max date also converted from unix time...thanks:

enter image description here

1

1 Answers

2
votes

I think you want:

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;