### Question:

How to cut one row to starttime and endtime to mutiple day spend hour rows

### Table Data and DDL:

```
starttime           , endtime
2019/05/03 08:00:00 , 2019/05/05 12:00:00

```

```
CREATE TABLE T  ("starttime" timestamp, "endtime" timestamp);
INSERT  INTO T ("starttime", "endtime") VALUES ('03-May-2019 08:00:00 AM', '05-May-2019 12:00:00 PM');

```

### Expected Result:

```
Date        , SpendHour
2019/05/03 , 16
2019/05/04 , 24
2019/05/05 , 12

```

[Online Demo Link | DB Fiddle](https://dbfiddle.uk/?rdbms=oracle_11.2&fiddle=cd908e2fd2be0d6118c40da61ad2d469)