DB2 v10.5.0.5 on Linux
I have a table of something like:
LOG_IN | LOG_OFF ----------------------------------------- 2017-01-22 08:00:00 | 2017-01-22 09:00:00 2017-01-22 09:01:00 | 2017-01-22 10:00:00 2017-01-22 10:00:00 | 2017-01-22 10:15:00 2017-01-22 10:15:00 | 2017-01-22 10:45:00 2017-01-22 11:00:00 | 2017-01-22 11:29:00 2017-01-22 11:30:00 | 2017-01-22 12:00:00
I would like to select the rows where it has a gap of 1 minute with other rows.
Desired result:
LOG_IN | LOG_OFF ----------------------------------------- 2017-01-22 08:00:00 | 2017-01-22 09:00:00 2017-01-22 09:01:00 | 2017-01-22 10:00:00 2017-01-22 11:00:00 | 2017-01-22 11:29:00 2017-01-22 11:30:00 | 2017-01-22 12:00:00