hive sql find the latest record

后端 未结 8 2009
别那么骄傲
别那么骄傲 2021-01-30 17:28

the table is:

create table test (
id string,
name string,
age string,
modified string)

data like this:

id    name   age  modife         


        
8条回答
  •  无人共我
    2021-01-30 18:15

    try this

    select id,name,age,modified from test
     where modified=max(modified)
     group by id,name
    

提交回复
热议问题