Question

Locked

oracle sql (select a column and subtract it to the column of the next row)

By swishkeed ·
For example, i have this table;
START END
----- -----
06:57:35 07:00:43
07:03:50 07:07:00
07:07:12 07:10:21
07:13:18 07:16:24


how do you get a result to be like this;
START END RESULT
----- ----- ------
06:57:35 07:00:43
07:03:50 07:07:00 00:03:07
07:07:12 07:10:21 00:00:12
07:13:18 07:16:24 00:02:57

How do you select the column END from the first row then subtracting it to the column START of the next row. (goes like 07:00:43 - 07:03:50,
that's why you will notice that the RESULT of the first row is blank)

thank you...

This conversation is currently closed to new comments.

3 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Answers

Back to IT Employment Forum
3 total posts (Page 1 of 1)  

Related Discussions

Related Forums