Tags / gaps-and-islands
Creating Time Windows with Alternating Values in T-SQL
Removing Consecutive Duplicates in Oracle SQL Using LAG() with a Condition
Splitting a Column Value into Two Separate Columns in MySQL Using Window Functions
SQL Running Total with Cumulative Flag Calculation Using Common Table Expression
SQL Query to Calculate Sum of Values for Each User and Date, Treating Consecutive Days as a Single Day