Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Split time range into hourly buckets with duration

user10130289Sep 24 2015 — edited Sep 25 2015

Hi,

I have a table that has Start and Stop time range with Duration, along with other columns as below ( The start and stop are always on the same day, doesn't span across days). I want to split the time range into hourly buckets and calculate the time spent in that hour bucket and retrieve as separate columns as shown below. The database is Oracle 11g.

Any help is appreciated please.

QUESTION.jpg

This post has been answered by Frank Kulash on Sep 25 2015
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 23 2015
Added on Sep 24 2015
8 comments
5,196 views