会编程的发呆爱好者加麻加辣
会编程的发呆爱好者加麻加辣
全部文章
分类
归档
标签
去牛客网
登录
/
注册
会编程的发呆爱好者加麻加辣的博客
全部文章
(共208篇)
题解 | 网易云音乐推荐(网易校招笔试真题)
#user_id=1的人关注的人喜欢的音乐 select music_name from (select distinct music_id, music_name from music_likes join music on music_id=id where user_id in (select...
2025-06-21
0
12
题解 | 查找在职员工自入职以来的薪水涨幅情况
#当前工资 with a as (select emp_no,salary as now_salary from salaries where to_date ='9999-01-01'), #起始工资 b as (select s.emp_no,salary as begin_salary fr...
2025-06-19
0
11
题解 | 牛客每个人最近的登录日期(四)
with a as (select min(date) as fdate,user_id from login group by user_id), b as( select date from login) select date,count(user_id) as new from (sele...
2025-06-18
0
24
题解 | 牛客每个人最近的登录日期(五)
with a as (select min(date) as f_t,user_id from login group by user_id), b as( select date,user_id from login ), c as( select date t fro...
2025-06-18
0
26
题解 | 牛客每个人最近的登录日期(三)
with a as (select user_id,min(date) as first_date from login group by user_id), b as( select user_id,date from login ) select round(count(b....
2025-06-18
0
21
题解 | 计算用户的平均次日留存率
with a as (select distinct device_id,date as t from question_practice_detail), b as( select distinct device_id,date as t from question_practice_d...
2025-06-18
0
23
题解 | 获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
select e.emp_no,salary, last_name,first_name from salaries s join employees e on s.emp_no = e.emp_no where salary = (select max(salary) from (select s...
2025-06-17
0
22
题解 | 获取员工其当前的薪水比其manager当前薪水还高的相关信息
with a as (select de.emp_no,s.salary as emp_salary,dept_no from dept_emp de left join salaries s on s.emp_no = de.emp_no), b as( select dm.emp_no...
2025-06-17
0
20
题解 | 获得积分最多的人(三)
select user_id,name,grade_num from (select user_id,name,sum(grade) as grade_num,dense_rank() over( order by sum(grade) desc) as rk from (select user_...
2025-06-17
0
13
题解 | 查询连续登陆的用户
select user_id from (select l.user_id,date(log_time) as date, row_number() over(partition by l.user_id order by log_time) as rk, date_sub(date(log_tim...
2025-06-17
0
20
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页