题解 | 平均播放进度大于60%的视频类别

平均播放进度大于60%的视频类别

https://www.nowcoder.com/practice/c60242566ad94bc29959de0cdc6d95ef

select
    tag,
    concat(round(avg(case when timestampdiff(second,start_time,end_time)/duration >=1 then 1
    else timestampdiff(second,start_time,end_time)/duration end)*100,2),'%')avg_play_progress
from
    tb_video_info s1
left join 
    tb_user_video_log s2
using(video_id)
where tag is not null
group by 1
having avg(case when timestampdiff(second,start_time,end_time)/duration >=1 then 1
    else round(timestampdiff(second,start_time,end_time)/duration,2) end)>0.6
order by 2 desc

全部评论

相关推荐

06-23 11:43
门头沟学院 Java
allin校招的烤冷...:我靠,今天中午我也是这个hr隔一个星期发消息给我。问的问题还是一模一样的😅
点赞 评论 收藏
分享
仁者伍敌:难怪小公司那么挑剔,让你们这些大佬把位置拿了
点赞 评论 收藏
分享
怎么起名字:早知道就不读书了,害得我送外卖还得扶眼镜
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客网在线编程
牛客网题解
牛客企业服务