I am getting the 'interval' wise (30 min, 15 min, 45 min) data in my stored procedure now I want to combine the 'time slot' of (30 min, 15 min, 45 min, etc.) and do the 'addition' of above column.
e.g Existing procedure output:
Time Parameter 1 Parameter 2 Parameter 3
----------------------------------------------------
8:00 7.6 2 0
8:30 7.52 2 0
9:00 20.6 1 0
9:30 5.57 1 0
10:00 5.43 1 0
10:30 5.78 1 0
11:00 8.09 1 0
11:30 10.48 1 0
12:00 10.11 1 0
12:30 9.95 0 0
13:00 6 1 0
13:30 5.08 0 0
14:00 5.31 0 0
14:30 20.38 0 0
15:00 6.17 0 0
And I want to be as :
Time-slot Parameter 1 Parameter 2 Parameter 3
-------------------------------------------------------------
8:00:00 - 8:30:00 15.12 4 0
8:30:00 - 9:00:00 28.12 3 0
9:00:00 - 9:30:00 26.17 2 0
9:30:00 - 10:00:00 11 2 0
10:00:00 - 10:30:00 11.21 2 0
10:30:00 - 11:00:00 13.87 2 0
11:00:00 - 11:30:00 18.57 2 0
11:30:00 - 12:00:00 20.59 2 0
12:00:00 - 12:30:00 20.06 1 0
12:30:00 - 13:00:00 15.95 1 0
13:00:00 - 13:30:00 11.08 1 0
13:30:00 - 14:00:00 10.39 0 0
14:00:00 - 14:30:00 25.69 0 0
14:30:00 - 15:00:00 26.55 0 0