假如根据id去重,取第一条数据,对应当前hive 语句为:
select t.id, t.name, t.time_c
from (
select id,
name,
time_c,
row_number() over(partition by id order by time_c desc) rank
from table_name
) t
where t.rank = 1