牛客752205773号
牛客752205773号
全部文章
分类
题解(55)
归档
标签
去牛客网
登录
/
注册
牛客752205773号的博客
全部文章
(共42篇)
题解 | #汇总各个部门当前员工的title类型的分配数目#
select a.dept_no,b.dept_name,c.title,count(c.title) from dept_emp a left join departments b on a.dept_no=b.dept_no left join titles c on a.emp_no=c.em...
Mysql
2022-06-23
0
300
题解 | #获取员工其当前的薪水比其manager当前薪水还高的相关信息#
select t8.emp_no,t4.manager_no,t8.emp_salary,t4.manager_salary from (select t1.dept_no, t3.emp_no manager_no, t2.salary manager_salary from dept_emp ...
Mysql
2022-06-22
0
219
题解 | #获取所有非manager员工当前的薪水情况#
select t1.dept_no,t.emp_no,t2.salary from employees t left join dept_emp t1 on t.emp_no=t1.emp_no left join salaries t2 on t.emp_no=t2.emp_no where t....
Mysql
2022-06-22
0
218
题解 | #对所有员工的薪水按照salary降序进行1-N的排名#
select t1.emp_no,t1.salary,t.t_rank from( select b.salary, count(distinct a.salary) t_rank from salaries a ...
Mysql
2022-06-22
0
191
题解 | #查找在职员工自入职以来的薪水涨幅情况#
select g.emp_no, (g.last_salary-f.orgin_salary) growth from ( select a.emp_no, a.salary orgin_salary from salaries ...
Mysql
2022-06-22
0
310
题解 | #获取当前薪水第二多的员工的emp_no以及其对应的薪水salary#
select c.emp_no, c.salary from salaries c join (select salary, row_number()over(order by a.salary desc) rt from ( ...
Mysql
2022-06-17
0
206
题解 | #查找employees表emp_no与last_name的员工信息#
select a.emp_no, a.birth_date, a.first_name, a.last_name, a.gender, a.hire_date from( select emp_no, birth_date, first_name, last...
Mysql
2022-06-17
0
218
题解 | #获取每个部门中当前员工薪水最高的相关信息#
d.dept_no,d.emp_no,d.salary maxSalary from(select *,row_number()over(partition by c.dept_no order by c.salary desc) rt from (select a.dept_no,a.emp_no...
Mysql
2022-06-17
1
226
题解 | #获取所有员工当前的manager#
a.emp_no, b.emp_no from dept_emp a inner join dept_manager b on a.dept_no = b.dept_no where a.emp_no<>b.emp_no and a.to_date='9999-01-01' and b....
Mysql
2022-06-17
1
227
题解 | #查找薪水记录超过15条的员工号emp_no以及其对应的记录次数t#
a.emp_no, max(a.rt) t from( select *, row_number()over(partition by emp_no order by salary) rt from salaries) a group by 1 having t >15
Mysql
2022-06-17
1
278
首页
上一页
1
2
3
4
5
下一页
末页