select tag, concat ( round( avg( case when timestampdiff (second, start_time, end_time) < duration then timestampdiff (second, start_time, end_time) / duration else 1 end ) * 100, ...