开窗函数 LAST_VALUE的结果不正确 #15385
zhudinghai
started this conversation in
General
Replies: 2 comments
-
建表语句方便发一下吗? |
Beta Was this translation helpful? Give feedback.
0 replies
-
the frame of window function with order by is |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
在Doris版本1.14上发现问题:
last_value(t1.job_status) over (partition by t1.staff_code order by t1.maint_date asc) last_job_status
执行的结果不正确
不过可以使用如下代替
first_value(t1.job_status) over (partition by t1.staff_code order by t1.maint_date desc) last_job_status
Beta Was this translation helpful? Give feedback.
All reactions