SUM of Duration based on the DateTime that needs to be updated in previous Half hour interval
问题 I searched several questions but that all are not exactly answering my question. Hence raised this question here. I have a table say 'Table' that has has DateTime,ID, Code and Duration are the columns. DateTime will be having data as '2017-12-12 00:30:00','2017-12-12 00:30:37' etc and I need to SUM the duration column based on this Interval date. If DateTime is '2017-12-12 00:30:00' then our query should sum all the data between '2017-12-12 00:00:00' to '2017-12-12 00:30:00' and show it in