Samples
Given a table calledliveness containing weekly heartbeat aggregates in column health with timestamp column date,
use the following to get the intervals where the system was unhealthy during the week of Jan 9, 2022. This correctly
excludes any ranges covered by a heartbeat at the end of the Jan 2 week.