Added in 12c, SQL pattern matching make it easy to search for sequences of different events across rows.
But how does it work?
Watch this presentation for a complete beginner's guide to match_recognize. With visualizations to show how it selects the rows, this session will teach you how to use this powerful clause.
Highlights include:
02:40 - An overview of match_recognize & its clauses
08:40 - Demo of using pattern matching with one variable to find consecutive 1km runs
17:00 - Comparing results when searching for different patterns of 1km runs
27:15 - Demo searching for two variables - 1km run followed by a 5km run
35:00 - Displaying overlapping patterns in the input
39:00 - Does pattern matching replace the where clause?
42:30 - Comparing different patterns outputs when using two variables
44:30 - Classifying rows into value ranges - the limitations of regular expressions
48:30 - Demo using pattern matching to group rows into range values and calculate totals
58:10 - Why use pattern matching - example use cases
Further reading:
Complete Guide to SQL Pattern Matching - Volume 1 - https://books.apple.com/us/book/compl...
SQL Pattern Matching (match_recognize) Use Cases - https://blogs.oracle.com/sql/post/ogb...
Watch video Visualizing SQL Pattern Matching (MATCH_RECOGNIZE) - A Beginner's Guide online without registration, duration hours minute second in high quality. This video was added by user Oracle Developers 16 March 2022, don't forget to share it with your friends and acquaintances, it has been viewed on our site 5,009 once and liked it 97 people.