select t1.tag, concat (round(t1.avg_play_progress * 100, 2), '%') avg_play_progress from ( select tag, avg( if ( TIMESTAMPDIFF (second, start_time,end_time) >= duration, duration, ...