题解 | #各个视频的平均完播率#
平均播放进度大于60%的视频类别
http://www.nowcoder.com/practice/c60242566ad94bc29959de0cdc6d95ef
select tt.tag, concat( round( avg( if( TIMESTAMPDIFF(SECOND, t.start_time, t.end_time) > tt.duration, 1, timestampdiff(second, t.start_time, t.end_time) / tt.duration )) * 100, 2 ), '%' ) avg_play_progress from tb_user_video_log t, tb_video_info tt where t.video_id = tt.video_id group by tt.tag having avg_play_progress > 60 order by 2 desc