Guest_imported
New member
- Jan 1, 1970
- 0
Hi,
I have a table with two columns, which contains when a device was turned off.
TIME STATUS
10:23 ON
10:44 OFF
11:24 ON
11:29 OFF
12:56 ON
12:59 OFF
I want to create another table using a select statement (no othere privileges in that database) that will contain how long the device was switched on.
TIME_ON TIME_OFF DURATION
10:23 10:44 21
11:24 11:29 5
12:56 12:59 3
What is the select statement I should use? Thanks.