舒舒南
舒舒南
全部文章
分类
归档
标签
去牛客网
登录
/
注册
舒舒南的博客
全部文章
(共26篇)
题解 | 最长连续登录天数
select user_id,max(连续登陆天数) max_consec_days from (select user_id,count(差值) 连续登陆天数 from (select *,day(fdate)-row_number()over(partition by user_id order...
2025-03-09
0
57
题解 | #牛客每个人最近的登录日期(三)#
#先拿出user_id,date这两列去重 #再用窗口函数找出首次登录后下一次登录的日期,计算二者差值是否为1,若为1,就留存成功了 with t1 as ( select distinct user_id, date ...
2024-09-10
0
73
题解 | #牛客每个人最近的登录日期(二)#
select person_name, client_name, date from ( select t2.name person_name, t3.name client_name, ...
2024-09-08
0
83
题解 | #异常的邮件概率#
select distinct date, round(ration, 3) from ( select date, type, send_id, receive...
2024-09-08
0
103
题解 | #给出employees表中排名为奇数行的名#
select first_name from ( select emp_no, first_name, row_number() over ( order by ...
2024-09-08
0
92
题解 | #获取有奖金的员工相关信息。#
select t1.emp_no en, first_name, last_name, btype, salary, case when btype = 1 then salary * 0.1 when btype = ...
2024-09-08
0
127
题解 | #获取员工当前的薪水比其manager当前薪水还高
#将员工信息和工资表连接起来 # select t1.emp_no e1,t1.dept_no d1,t2.dept_no d2,t2.emp_no e2,salary s # from dept_emp t1 left join dept_manager t2 on (t1.dept_no=t2....
2024-09-03
0
108
题解 | #查找在职员工自入职以来的薪水涨幅情况#
# #最开始工资 # select employees.emp_no e1,salary s1,from_date f1,to_date t2 # from employees left join salaries on (employees.emp_no=salaries.emp_no) # wh...
2024-09-02
1
101
题解 | #获取当前薪水第二多的员工的薪水salary#
#先寻找最高工资 select max(salary) from salaries #再寻找第二高工资 # select max(salary) # from salaries # where salary != (select max(salary) # from salaries) #找到工资...
2024-09-01
0
96
题解 | #获取当前薪水第二多的员工信息#
select emp_no,salary from salaries where salary = (select salary from salaries group by salary order by salary desc limit 1 offset 1)
2024-09-01
0
92
首页
上一页
1
2
3
下一页
末页