Wednesday, November 22, 2017

TIME STAMP DIFFERENCE AVG


 select
    avg(extract(second from intrvl)
        + extract(minute from intrvl) * 60
        + extract(hour from intrvl) * 60 * 60
        + extract(day from intrvl) * 60 * 60 * 24) average
from (
 SELECT    ( TIME_STAMP1-TIME_STAMP2) intrvl

  FROM  Z_TABLE   )

No comments:

Post a Comment