I don't see hwo this is that ahrd, but I can't seem to find the solution anywhere. It's done for dates, but I can't see to make it work for TIMESTAMP.
I'm trying to do
select avg(last_timestmp - ref_timestmp) as average from param
It keeps telling me it's not a valid number, which I get. But how do I make it a valid number? I have tried extract and a bunch of other stuff but nothing seems to work.
I want the average in seconds. one hundredth of a second would be .01
and 6 hours would be 21600
Thanks!