Hello all,
I am trying to study Match_recognize feature in 12c and i have a question related to this.
below are the create table and insert scrips.
create table tttd (dt date,val number)
/
INSERT INTO tttd
VALUES(TO_DATE('2017-07-02 10:42:33', 'YYYY-MM-DD HH24:MI:SS'),25);
INSERT INTO tttd
VALUES(TO_DATE('2017-07-01 10:42:33', 'YYYY-MM-DD HH24:MI:SS'),20);
INSERT INTO tttd
VALUES(TO_DATE('2017-06-30 10:42:33', 'YYYY-MM-DD HH24:MI:SS'),50);
INSERT INTO tttd
VALUES(TO_DATE('2017-06-29 10:42:33', 'YYYY-MM-DD HH24:MI:SS'),40);
INSERT INTO tttd
VALUES(TO_DATE('2017-06-28 10:42:33', 'YYYY-MM-DD HH24:MI:SS'),90);
INSERT INTO tttd
VALUES(TO_DATE('2017-06-27 10:42:33', 'YYYY-MM-DD HH24:MI:SS'),80);
INSERT INTO tttd
VALUES(TO_DATE('2017-06-26 10:42:33', 'YYYY-MM-DD HH24:MI:SS'),70);
INSERT INTO tttd
VALUES(TO_DATE('2017-06-25 10:42:33', 'YYYY-MM-DD HH24:MI:SS'),110);
INSERT INTO tttd
VALUES(TO_DATE('2017-06-24 10:42:33', 'YYYY-MM-DD HH24:MI:SS'),90);
INSERT INTO tttd
VALUES(TO_DATE('2017-06-23 10:42:33', 'YYYY-MM-DD HH24:MI:SS'),100);
-----
I have copied both sql and output. my question is why A_Val is null for alternative rows and why V_VAL is same for each 2 rows.( Basically i am trying to understand how this query is working).
select * from tttd
match_recognize (
order by dt
measures
a.val a_val,
b.val b_val
all rows per match
pattern (b a)
define
a as 1=1
)

Thanks.