Return the number of gaps between the periods of liveness. Additionally, if the aggregate is not live at the start or
end of its covered interval, these are also considered gaps.
Given a table called liveness containing weekly heartbeat aggregates in column health with timestamp column date,
use this query to see how many times the system was down in a particular week: