Tags / gaps-and-islands
SQL Window Functions for Aggregate Calculations with the COALESCE and MAX Approach
Identifying Potential Entry and Exit Rows in SQL Server Using CTEs
Running Totals from Consecutive Columns: A Flexible Approach to Gaps and Islands
SQL Query to Calculate Sum of Values for Each User and Date, Treating Consecutive Days as a Single Day
Splitting a Column Value into Two Separate Columns in MySQL Using Window Functions
Finding Adjacent Vacations: A Recursive CTE Approach in PostgreSQL