© Kim Berg Hansen 2020
K. Berg HansenPractical Oracle SQLhttps://doi.org/10.1007/978-1-4842-5617-6_17

17. Up-and-Down Patterns

Kim Berg Hansen1 
(1)
Middelfart, Denmark
 

Using match_recognize is also known as row pattern matching for a reason – it is very applicable for situations where you have data nicely ordered in, for example, a time series that can be depicted with a value on the y axis and the time on the x axis of a graph. Visually on a graph is an easy way for us humans to look for patterns – match_recognize can do the same with SQL.

It doesn’t necessarily have to be time on the x axis, and there could be multiple values on the y axis – the thing to remember is that if you as human would visualize something on line graphs and look for patterns ...

Get Practical Oracle SQL: Mastering the Full Power of Oracle Database now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.