I want to create hive query for the following.
insert into tempTableName
select distinct col_a
, first_value(col_b)
over (partition by col_a
order by nvl(col_c,0) desc, length(col_b) asc, col_b asc)
from tableA
As hive does not support first value.I want to know what could be the equivalent in simple query for first_value function. Any suggestions ??