select tag, concat(round(avg(play_progress)*100, 2), '%') as avg_play_progress from (select a.video_id, b.tag, case when timestampdiff(second, a.start_time, a.end_time) >= b.duration then 1 else timestampdiff(second, a.start_time, a.end_time) / b....