有没有什么方法可以把below lead函数转换成hive ql格式??
NVL(LEAD(START_DT) OVER (PARTITION BY EV_ID,AR_EV_RLTNSHP_TYPE_CD ORDER BY START_DT)-1,'2099-12-31') AS DERIVED_END_DT
pfb错误:
失败:parseexception行1:1599丢失)在“over”附近('在子查询源中,行1:1603丢失在'('附近')('在子查询源中,行1:1604不能通过子查询源中的'ev\u id'识别'分区'附近的输入
1条答案
按热度按时间cs7cruho1#
这在hivesql中很复杂,但是您可以使用
left join
和聚合:这就对
start_date
在一个特定的群体中是独一无二的,但它可能会为你的目的而工作。