Finding Average Timestamp
767018Aug 19 2010 — edited Aug 19 2010Hey,
I have a table with two columns: FILE_ID (NUMBER), ARRIVAL_TIME (TIMESTAMP).
I want to figure out the average ARRIVAL_TIME for a given file. I can't seem to find out how to do this. When I try to execute the following:
SELECT AVG(V.ARRIVAL_TIME)
FROM FILE_ARRIVALS V WHERE FILE_ID = SOME_NUMBER
I get this error:
ORA-00932: inconsistent datatypes: expected NUMBER got TIMESTAMP
I've found many examples of getting the average timespan between two timestamps or dates, but they don't fit my needs.
Thanks!
Jeffrey Kevin Pry
Edited by: jeffrey.pry on Aug 19, 2010 5:44 AM