SQL Daily (@sqldaily) 's Twitter Profile
SQL Daily

@sqldaily

Daily Oracle SQL tips from the Oracle Developer Advocates for SQL

ID: 3001841930

linkhttp://blogs.oracle.com/sql calendar_today29-01-2015 17:45:15

2,2K Tweet

25,25K Takipçi

4 Takip Edilen

SQL Daily (@sqldaily) 's Twitter Profile Photo

Group rows on consecutive dates with #SQL pattern matching SELECT ... FROM ... MATCH_RECOGNIZE ( ORDER BY dt MEASURES ... PATTERN ( init consecutive* ) DEFINE consecutive AS dt = PREV ( dt ) + 1 ) The pattern is a regular expression over the defined variables