Lateral
Lateral
全部文章
分类
归档
标签
去牛客网
登录
/
注册
Lateral的博客
全部文章
(共102篇)
题解 | 被重复观看次数最多的3个视频
select t.cid, sum(t.pv) as pv, row_number() over(order by sum(t.pv) desc,c.release_date desc) as rk from (select p.cid, ...
2025-03-21
0
23
题解 | 被重复观看次数最多的3个视频
select t.cid, sum(t.pv) as pv, row_number() over(order by sum(t.pv) desc,c.release_date desc) as rk from (select p.cid, count(p.uid) as pv from play_r...
2025-03-21
0
25
题解 | 查询成绩
select count(*) from (select t1.sId from (select sId, case when cId=1 then score else 0 end as c1_score from SC) t1 left join (select sId, case...
2025-03-21
0
26
题解 | 请写出计算粉丝ctr的sql语句
select sum(c.read_num)/sum(c.show_num) as fans_ctr from c left join b on c.content_id=b.content_id left join a on b.author_id=a.author_id where c.fa...
2025-03-21
0
26
题解 | 商品交易(网易校招笔试真题)
select g.id, g.name, g.weight, sum(t.count) as total from trans t left join goods g on t.goods_id=g.id where g.weight<50 group by g.id having sum(t...
2025-03-21
0
41
题解 | 网易云音乐推荐(网易校招笔试真题)
select t2.music_name from (select m.id, m.music_name from (select distinct music_id from music_likes wher...
2025-03-21
0
45
题解 | 网易云音乐推荐(网易校招笔试真题)
select t2.music_name from (select m.id, m.music_name from (select distinct music_id from music_likes where user_id in(select follower_id ...
2025-03-21
0
41
题解 | 支付间隔平均值
select cast(cast(avg(abs(timestampdiff(second,s.logtime,o.logtime)))as decimal(5,0))as unsigned) as gap from order_log o left join select_log s o...
2025-03-07
0
35
题解 | 每天登陆最早的用户的内容喜好
select t.log_day, t.user_id, t.hobby from (select date(l.log_time) as log_day, l.user_id, u.hobby, rank() over(partition by date(l.log_time) order by ...
2025-03-07
0
46
题解 | 统计加班员工占比
select t.department, concat(cast(sum(t.ifoverwork)*100/count(t.department) as decimal(5,1)),'%') as ratio from (select s.department, case when tim...
2025-03-07
0
33
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页