我试图弄清楚这个使用 MATCH_RECOGNIZE 的简单查询是错误的。我收到错误 ORA-00933:SQL 命令未正确结束。我可能会错过什么?
SELECT EMPLOYEE_ID,DEPARTMENT_ID,SALARY FROM EMPLOYEES
MATCH_RECOGNIZE(
PARTITION BY DEPARTMENT_ID
ORDER BY HIRE_DATE
MEASURES
EMPLOYEE_ID,DEPARTMENT_ID,SALARY
ONE ROW PER MATCH
PATTERN( A B* )
DEFINE
B AS ( B.SALARY < PREV(B.SALARY))
)