I have a table with 2 columns: start time and end time. For each row the interval interval (end time -start time) represents the duration. I need to find the toal duration per each hour. Note that the time intervals not necessarily are restricted to a specific hour. A part of the table looks like:
Start Time End time
13-Sep-2019 04:12:37 13-Sep-2019 04:16:34
13-Sep-2019 04:18:36 13-Sep-2019 04:33:36
13-Sep-2019 04:33:36 13-Sep-2019 04:48:36
13-Sep-2019 04:48:36 13-Sep-2019 05:03:36
13-Sep-2019 05:03:36 13-Sep-2019 05:18:36
13-Sep-2019 05:18:37 13-Sep-2019 05:33:37
13-Sep-2019 05:33:37 13-Sep-2019 05:48:37
13-Sep-2019 05:48:37 13-Sep-2019 06:03:37
13-Sep-2019 06:03:37 13-Sep-2019 06:18:38
13-Sep-2019 06:18:38 13-Sep-2019 06:33:38
The ideal output would be a table with two columns: hour and total time intervals.
Ex:
Hour Total Duration
13-Sep-2109 04:00:00 X
13-Sep-2109 05:00:00 Y
13-Sep-2109 06:00:00 Z
Best Answer