题解 | 被重复观看次数最多的3个视频
select cid, pv, ROW_NUMBER() over(order by pv desc, release_date desc) rk FROM (select b.cid, release_date, b.uid, round(sum(1),3) pv from play_record_tb b left join course_info_tb a on a.cid = b.cid group by b.cid,b.uid, release_date having pv > 1 ) t1 limit 3
不要被题目那么多解释性的语言绕进去了,关键的就只有几点: