题解 | 播放量峰值top3高的视频

播放量峰值top3高的视频

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

select cid,round(max(peak_uv),3) as max_peak_uv
from(
	select cid,sum(tag)over(partition by cid order by time) as peak_uv
	from(
		select cid,start_time as time,1 as tag
		from play_record_tb
		union all
		select cid,end_time as time,-1 as tag
		from play_record_tb)a)b
group by cid
order by max_peak_uv desc
limit 3


全部评论
我朝,甜菜
点赞 回复 分享
发布于 03-21 18:43 天津

相关推荐

改了别人代码,还有很多不规范行为,mentor因为我加班两天,感觉自己总是get不到mentor的点理解错误
在度假的小确幸很卖萌:没事,不考虑转正的话就不用太担心,不转正的实习生就是✌🏻。如果考虑转正,也不用太担心,因为不可能让你转正了。
点赞 评论 收藏
分享
02-16 13:52
门头沟学院 Java
给🐭🐭个面试机会吧:嘿,mvbatis
点赞 评论 收藏
分享
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

更多
牛客网
牛客企业服务