Tags / gaps-and-islands
Running Totals from Consecutive Columns: A Flexible Approach to Gaps and Islands
Filling Missing Dates in PostgreSQL with Zero Using generate_series Function
SQL Ranking Based on Condition
SQL Window Functions for Aggregate Calculations with the COALESCE and MAX Approach
SQL Query to Calculate Sum of Values for Each User and Date, Treating Consecutive Days as a Single Day
Merging Overlapping Date Ranges in SQL Server 2014
Finding Missing Numbers in a Sequence: A Recursive Approach