0
with curse as (select luna,an,valoare from cursl where moneda='eur')

    SELECT *

    FROM curse MATCH_RECOGNIZE (

        ORDER BY an,luna
        MEASURES strt.an as start_an, strt.luna as start_luna,
              strt.valoare as euro_inc,LAST(scade.valoare) as euro_sf,
              count(*) as nr_luni,
              strt.valoare-LAST(scade.valoare) as dif
        ONE ROW PER MATCH
        PATTERN (strt scade{3,})
        DEFINE
            scade AS scade.valoare < PREV(scade.valoare)
        ) a
    ORDER BY a.start_an,a.start_luna;

运行此程序时,我收到: ORA-00933: SQL 命令未正确结束 00933. 00000 - “SQL 命令未正确结束”

4

1 回答 1

2

根据Oracle-Base

Oracle 12c 添加了 MATCH_RECOGNIZE 子句

于 2017-05-24T18:18:36.973 回答