牛客102435226号
牛客102435226号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客102435226号的博客
全部文章
(共15篇)
题解 | 实习广场投递简历分析(三)
select a1.job,a1.date1 as first_year_mon,a1.f_num as first_year_cnt, a2.date2 as second_year_mon,a2.s_num as second_year_cnt from (select substr(date,...
2025-09-12
0
14
题解 | 牛客每个人最近的登录日期(五)
# 每个日期新用户的次日留存率。 SELECT a1.date, ifnull(round(sum(if(a3.user_id is not null,1,0))/count(a2.user_id),3),0) as p FROM ( SELECT date from login group by...
2025-09-10
0
21
题解 | 使用正规方程的线性回归
import numpy as np def linear_regression_normal_equation(X: list[list[float]], y: list[float]) -> list[float]: # X转换为可计算的矩阵形式 X=np.array(X...
2025-08-10
1
40
题解 | 统计每个产品的销售情况
# 查询2023年每个产品的以下信息:产品ID、总销售额、单价、总销量、月均销售额、单月最高销量、购买数量最多的顾客年龄段 with xiaoshoue as ( select a1.product_id,sum(a2.quantity)*a1.unit_price as total_sales, ...
2025-08-03
0
36
题解 | 网易云音乐推荐(网易校招笔试真题)
# 查询向user_id = 1 的用户,推荐其关注的人喜欢的音乐。 with musci_likes as (select user_id,music_id from music_likes where music_id not in (select music_id from music_l...
2025-08-03
0
44
题解 | 牛客每个人最近的登录日期(五)
# 统计牛客每个日期新用户的次日留存率 with new_login AS ( select user_id,min(date) as new_date from login group by user_id ), riqi AS ( select distinct date from login ...
2025-07-18
0
40
题解 | 每个月Top3的周杰伦歌曲
# 18-25岁用户在2022年每个月播放次数top 3的周杰伦的歌曲。 # 1、先写一个临时表用于存储18-25岁的用户在2022年每个月播放的每个音乐id的次数 with cishu AS ( select month(t1.fdate) as month,t1.song_id,count(so...
2025-07-03
0
28
题解 | 近一个月发布的视频中热度最高的top3视频
select h.video_id,round((100*h.wanbolv+5*h.dianzan_cnt+3*comment_cnt+2*retweet_cnt)/(h.wubofangtianshu+1),0) as hot_indexfrom(#计算需要的各种指标select h1.vide...
2025-03-19
0
71
题解 | 完成员工考核试卷突出的非领导员工
select a.emp_id,b.emp_level,c.tag as exam_tag from (select h.emp_id,h.exam_id from (select h2.emp_id,h2.exam_id, row_number()over(partition by h2.exam...
2025-02-21
0
56
题解 | 短视频直播间晚上11-12点之间各直播间的在线人数
select h1.room_id,h2.room_name,h1.user_count from (select room_id,count(distinct user_id) as user_count from user_view_tb where substr(in_time,1,2) in...
2025-02-20
1
95
首页
上一页
1
2
下一页
末页