牛客883499015号
牛客883499015号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客883499015号的博客
全部文章
(共24篇)
题解 | 短视频直播间晚上11-12点之间各直播间的在线人数
select r.room_id as room_id, r.room_name as room_name, count(distinct u.user_id) as user_count #计算呆在直播间的人数,通过user_id计算 from room_info_tb as r ...
2026-03-20
0
16
题解 | 被重复观看次数最多的3个视频
#建临时表,寻找重复播放次数 with r as ( select p.cid as cid, count(p.cid) as pv from play_record_tb as p left join course_info_tb as c on...
2026-03-20
0
17
题解 | 查询成绩
with avg as ( select sId , avg(score) as avg_score from SC group by sId ) select count(*) from avg where avg.avg_score > 60 #简单到不敢相...
2026-03-19
0
14
题解 | 请写出计算粉丝ctr的sql语句
select sum(c.read_num) / sum(c.show_num) as fans_ctr from a left join b on a.author_id = b.author_id left join c on b.content_id = c.cont...
2026-03-19
0
20
题解 | 商品交易(网易校招笔试真题)
select t.goods_id as id, g.name as name, g.weight as weight, sum(t.count) as total from goods as g join trans as t on g.id = t.goo...
2026-03-18
0
16
题解 | 网易云音乐推荐(网易校招笔试真题)
with follower_likes as ( select f.user_id as user_id, ml.music_id as music_id from follow as f left join music_likes as ml on ml.user_id ...
2026-03-18
0
25
题解 | 每天登陆最早的用户的内容喜好
SELECT DATE_FORMAT(l1.log_time, '%Y-%m-%d') AS log_day, l1.user_id AS user_id, u.hobby FROM login_tb AS l1 LEFT JOIN user_action_tb AS u ...
2026-03-16
0
17
题解 | 统计加班员工占比
with staff_overtime as ( select staff_id, first_clockin, last_clockin from attendent_tb as a where (timestampdiff(minute, a.first_clockin,...
2026-03-15
0
15
题解 | 统计各个部门平均薪资
select st.department as department, round(avg(sa.normal_salary - sa.dock_salary), 3) as avg_salary from staff_tb as st left join salary_tb a...
2026-03-15
0
19
题解 | 查询单日多次下订单的用户信息?
select distinct date_format(o.order_time,'%Y-%m-%d') as order_date, o.user_id as user_id, count(o.order_time) as order_nums, u.vip as vip ...
2026-03-15
0
17
首页
上一页
1
2
3
下一页
末页