Tags / gaps-and-islands
How to Group SQL Records by Last Occurrence of ID: A Step-by-Step Solution
SQL Running Total with Cumulative Flag Calculation Using Common Table Expression
Identifying Consecutive Vacant Seats in MySQL: A Comprehensive Approach
Running Totals from Consecutive Columns: A Flexible Approach to Gaps and Islands
Creating Time Windows with Alternating Values in T-SQL
Finding Adjacent Vacations: A Recursive CTE Approach in PostgreSQL