I have the following events ordered by the time they happened:
e4 -> e2 -> e2 -> e3 -> e10 -> e4
How should I write PATTERN part of MATCH_RECOGNIZE to match record if e2 event happened and then e4 happened(e2 before e4) no matter if there are 0 or more other events between those two?
e4 -> e2 -> e2 -> e3 -> e10 -> e4 - matched
e4 -> e2 -> e4 - matched
e4 -> e4 -> e2 -> e3 - not matched
e2 -> e10 -> e2 -> e5 -> e4 - matched
so the four sequences, they can be minimal matched with:
giving:
But given you said you want "matches", then maybe you just want the range details, thus:
might be what you are after: