• I woulld be very curious to know from the OP what kind of environment produces this sort of data.

    Although the problem is interesting, what exactly does the query result tell you? What sort of decision can be made?

    Instead of 7 consecutive days >18 hours, would you ever ask something different? E.g. 14 consecutive days >12 hous?