# Row pattern recognition with MATCH\_RECOGNIZE

DevFeed: [Row pattern recognition with MATCH\_RECOGNIZE](<https://devfeed.tech/articles/row-pattern-recognition-with-match-recognize-8664.md>)

Original publisher: [Read original article](<https://trino.io/blog/2021/05/19/row_pattern_matching.html>)

Author: Kasia Findeisen (kasiafi)

Published: 2021-05-19T00:00:00Z

Content type: article

Language: en

Sources: [Trino Blog](<https://devfeed.tech/sources/trino-blog.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Regular expression](<https://devfeed.tech/topics/regular-expression.md>), [data](<https://devfeed.tech/topics/data.md>)

Tags: [blog-post](<https://devfeed.tech/tags/blog-post.md>), [pattern-matching](<https://devfeed.tech/tags/pattern-matching.md>), [sql](<https://devfeed.tech/tags/sql.md>), [syntax](<https://devfeed.tech/tags/syntax.md>), [trends](<https://devfeed.tech/tags/trends.md>)

## AI overview

This blog post introduces SQL row pattern matching with MATCH_RECOGNIZE, supported by Trino since version 356. It explains how regular-expression-like patterns can match sequences of table rows and produce detailed or summary information for later query processing.

## Source excerpt

The MATCH_RECOGNIZE syntax was introduced in the latest SQL specification of 2016. It is a super powerful tool for analyzing trends in your data. We are proud to announce that Trino supports this great feature since version 356. With MATCH_RECOGNIZE, you can define a pattern using the well-known regular expression syntax, and match it to a set of rows. Upon finding a matching row sequence, you can retrieve all kinds of detailed or summary information about the match, and pass it on to be processed by the subsequent parts of your query. This is a new level of what a pure SQL statement can do. This blog post gives you a taste of row pattern matching capabilities, and a quick overview of the MATCH_RECOGNIZE syntax.