Hello,
I'm trying to get the average elapsed time for schedules from the event table. There are 14 entries per schedule. I want to add all 14 elapsed times and then average them. I have a couple select examples below but I've tried many different scenarios. The minutes column number should never be higher than 59. The first example shows 64 in the minutes column. The second example appears to be the same numbers just listed in a different format. I get the feeling I'm just adding elapsed time 'numbers' and averaging that number. Is it even possible to total 14 different HH:MM:SS time entries and then get the average of that time total? Thanks for any help you can give me on this.
NAHOLLAP846>
SELECT schedule_name, TRANSLATE('a bc:de:fg', DIGITS(AVG(completed-actual_start)), '_______abcdefgh_____',' ') as avg_runtime FROM events WHERE schedule_name like '%DM3-4%' and status = 'Completed' group by schedule_name
SCHEDULE_NAME AVG_RUNTIME
VM_DM3-4 0 00:64:91
NAHOLLAP846>
SELECT schedule_name, avg(time(completed) - time(actual_start)) as avg_runtime FROM events WHERE schedule_name like '%DM3-4%' and status = 'Completed' group by schedule_name
SCHEDULE_NAME AVG_RUNTIME
VM_DM3-4 6,491.857
I'm trying to get the average elapsed time for schedules from the event table. There are 14 entries per schedule. I want to add all 14 elapsed times and then average them. I have a couple select examples below but I've tried many different scenarios. The minutes column number should never be higher than 59. The first example shows 64 in the minutes column. The second example appears to be the same numbers just listed in a different format. I get the feeling I'm just adding elapsed time 'numbers' and averaging that number. Is it even possible to total 14 different HH:MM:SS time entries and then get the average of that time total? Thanks for any help you can give me on this.
NAHOLLAP846>
SELECT schedule_name, TRANSLATE('a bc:de:fg', DIGITS(AVG(completed-actual_start)), '_______abcdefgh_____',' ') as avg_runtime FROM events WHERE schedule_name like '%DM3-4%' and status = 'Completed' group by schedule_name
SCHEDULE_NAME AVG_RUNTIME
VM_DM3-4 0 00:64:91
NAHOLLAP846>
SELECT schedule_name, avg(time(completed) - time(actual_start)) as avg_runtime FROM events WHERE schedule_name like '%DM3-4%' and status = 'Completed' group by schedule_name
SCHEDULE_NAME AVG_RUNTIME
VM_DM3-4 6,491.857