how to make selecet subquery in hive sql
怎么在 hive sql 中实现 select 子查询
使用 row_number()处理
例如:
select zoneno, protseno, notetype, currtype, amount, workdate
from
(select zoneno, protseno, notetype, currtype, amount, workdate, row_number()
over (partition by zoneno, protseno, notetype order by amount desc, workdate) rnum
from abd_f.fcm_abd_f_dftmodtl_s) a
where a.rnum = 1
参考:
网友评论