Re: Oracle timediff function

From: Stéphane Faroult <>
Date: Sun, 14 Feb 2016 12:34:08 -0600
Message-ID: <>

Hi MJ,

     If I understand well, you want to compute the difference between two timestamps in different rows? First of all, subtraction of two dates will give you a result in seconds, and for subsequent rows look at lag() over (), for instance. It will avoid a self join.

Stéphane Faroult

On 14/02/16 12:25, MJ Chicago wrote:
> I am asking two questions here:
> a) compute timediff without having to join table onto itself
> b) any additional recommendation to generally improve query performance

Received on Sun Feb 14 2016 - 19:34:08 CET

Original text of this message