-- 头尾函数,到当前行,为止
select
dname,
ename,
salary,
hiredate,
first_value(salary) over(partition by dname order by hiredate)as first,
last_value(salary) over(partition by dname order by hiredate )as last
from employee;
MYSQL 寒假自学 2022 十二 (十一)
最新推荐文章于 2024-11-13 22:17:00 发布