SELECT tag, CONCAT (t1.avg_play_progress, "%") from ( select tag, round( avg( if ( timestampdiff (second, u.start_time, u.end_time) >= v.duration, 1, ...