Search Postgresql Archives

help with a query

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi all!

 

This is most certainly a lame question but perhaps someone is gracious enough to lend me a hand… ;-)

 

I have the following setup in a table:

 

The first record which is to be found (ok easy enough :D) with a timestamp meets a certain condition (ignition off)

The following record is for the event of ignition on again with a timestamp.

 

So the question here is: how can I compute the time difference between these two records in a single query?

Better yet: finding all the records that meet the first condition (ignition off) and the immediately following records as to compute the time difference. ;-)

 

Thanks in advance!

 

 

Pedro Doria Meunier

(351) 91 302 49 72 - (351) 96 247 99 12

pdoria@xxxxxxxxxxxxxx

MSN - pdoriam@xxxxxxxxxxx

ICQ - 308-182-126

Skype: pdoriam

 


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux