I'm trying to find all periods of time a system is in a specific state. The state is logged into a table. An example of the data is as follows:
Time - State 12:00 - 1 12:01 - 1 12:02 - 1 12:03 - 1 12:04 - 0 12:05 - 0 12:06 - 0 12:07 - 1 12:08 - 1 The result I would like to see is:
Start - End - State 12:00 - 12:03 - 1 12:04 - 12:06 - 0 12:07 - 12:08 - 1 Is there any predefined function to find the transition records?