Non sono sicuro che sia necessaria una sottoquery...
SELECT AVG(TIME_TO_SEC(y.creation_time)-TIME_TO_SEC(x.creation_time)) avg_diff
FROM my_table x
JOIN my_table y
ON y.operation_id = x.operation_id
AND y.operation_type = 'end'
WHERE x.operation_type = 'start';