How to find the time differences between successive rows?

The attached sample file contains different time entries from an Oracle DB for a day in the descending order. I am required to verify the time difference between all adjoining entries is 4 seconds. Can someone suggest which is the best way to find this?
Sample.xlsx
sukhoi35Asked:
Who is Participating?
 
sdstuberCommented:
to see the values and the difference from prior value

SELECT *
  FROM (SELECT your_column, prev_value, NUMTODSINTERVAL(your_column - prev_value, 'day') diff
          FROM (SELECT your_column, LAG(your_column) OVER (ORDER BY your_column) prev_value FROM your_table));


To find the rows that differ by more than 4 seconds from prior value

SELECT *
  FROM (SELECT your_column, prev_value, NUMTODSINTERVAL(your_column - prev_value, 'day') diff
          FROM (SELECT your_column, LAG(your_column) OVER (ORDER BY your_column) prev_value FROM your_table))
 WHERE diff > INTERVAL '4' SECOND
0
 
sukhoi35Author Commented:
Thank you very much!
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.