# case when 不能写在sum()里面 select a.video_id ,round(sum(a.完播)/count(a.video_id),3) avg_comp_play_rate from ( select ul.video_id ,case when timestampdiff(second,start_time,end_time) >= vi.d...