Hive Sql case when 不支持子查询

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

参考:

HIVE - hive subquery is not working with case when statement with IN clause

官网:LanguageManual SubQueries

官网:Subqueries in SELECT

你可能感兴趣的:(Hive Sql case when 不支持子查询)