Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Calculating Total Time
Hello all....
I need a little PL/SQL help.
I have at simple table
Timestamp Asset Status 2002-07-01 12:00 Pump 1 OPEN 2002-07-01 2:00 Pump 1 CLOSED 2002-07-01 3:30 Pump 1 OPEN 2002-07-01 3:45 Pump 1 CLOSED 2002-07-02 15:45 Pump 1 OPEN 2002-07-02 18:15 Pump 1 CLOSED
I would like to calculate the total time Pump 1 was OPEN and total time Pump 1 was closed for a given starting time period and ending time period.
Is this what Time Series is good for? Or is there an straight PL/SQL algorithm I can use?
Thanks. Received on Mon Jul 29 2002 - 10:36:16 CDT