I have a table that has Tracking_start_time and Tracking_end_time. I need to find Average tracking time.
What I need to do is Subtract Start time from end time and do a sum om it.
With one Query I can get sum and with one query I can get count of records. Dividing will give me average tracking time per transaction.
Currently I'm using Oracle9i Enterprise Edition Release 188.8.131.52.0 - 64bit Production
But I'd like the qurey to be simple SQL so that it's compatible tihe SQL Server, MySQL and DB2
I tried this
Select SUM(TRACKING_END_TIME - TRACKING_START_TIME) as thetime FROM TRACKING_SUMMARY
butI got an error ORA-00932: inconsistent datatypes: expected NUMBER got INTERVAL
I think we need to convert time to seconds then do the math but how??? help please