【发布时间】:2020-08-31 13:33:01
【问题描述】:
这个查询有什么错误?
select department_id, first_name,
lag(first_name) over (partition by department_id order by salary rows between 1 preceding and 2 following),
lead(first_name) over (partition by department_id order by salary rows between 1 preceding and 2 following)
from employees order by department_id;
错误是:
ORA-00907: missing right parenthesis
但是括号没问题。这里有什么问题?
【问题讨论】:
标签: sql oracle select window-functions analytic-functions