题解 | 最受欢迎的top3课程

最受欢迎的top3课程

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

with t1 as(
select cid
,score
,start_time
,round(timestampdiff(minute,start_time,end_time),3) len
from play_record_tb
)
,t2 as(
select cid
,avg(score) avg_score
from play_record_tb
group by cid
)
select t1.cid cid
,count(*) pv
,sum(len) time_len
from t1 join t2 on t1.cid=t2.cid
join course_info_tb t3 on t1.cid=t3.cid
where avg_score>=3 and start_time<=date_add(release_date,interval 7 day)
group by t1.cid
order by pv desc,time_len desc
limit 3;


服啦看了半天居然是这个问题

全部评论

相关推荐

能干的三文鱼刷了10...:公司可能有弄嵌入式需要会画pcb的需求,而且pcb能快速直观看出一个人某方面的实力。看看是否有面试资格。问你问题也能ai出来,pcb这东西能作假概率不高
点赞 评论 收藏
分享
评论
点赞
收藏
分享

创作者周榜

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