正确如下:
row_number() OVER( partition by session_id order by request_time) as row_num -- 不能带参数
rank(request_time) OVER( partition by session_id order by request_time) as row_num -- 要带参数
dense_rank() OVER( partition by session_id order by request_time) as row_num -- 不能带参数
percent_rank() OVER( partition by session_id order by request_time) as row_num -- 不能带参数
错误如下:
row_number(request_time) OVER( partition by session_id order by request_time) as row_num
rank() OVER( partition by session_id order by request_time) as row_num
dense_rank(request_time) OVER( partition by session_id order by request_time) as row_num
percent_rank(request_time) OVER( partition by session_id order by request_time) as row_num
Hive2.0.0版本
select
request_time,session_id,c3,c4,
Row_Number() OVER( partition by req