存几分期许
存几分期许
全部文章
分类
归档
标签
去牛客网
登录
/
注册
存几分期许的博客
全部文章
(共167篇)
题解 | 获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
with t as ( select a.emp_no, salary, last_name, first_name from employees a join salaries b on a.emp_no=b.emp_no ), t1 as ( select max(sal...
2025-08-14
0
37
题解 | 获取当前薪水第二多的员工的emp_no以及其对应的薪水salary
select emp_no, salary from ( select *, dense_rank() over (order by salary desc) as dr from salaries ) temp where dr=2 order by emp_no
2025-08-14
0
40
题解 | 统计出当前各个title类型对应的员工当前薪水对应的平均工资
select title, avg(salary) from titles a join salaries b on a.emp_no=b.emp_no group by title order by avg(salary)
2025-08-14
0
36
题解 | 查找employees表emp_no与last_name的员工信息
select * from employees where mod(emp_no, 2)=1 and last_name<>'Mary' order by hire_date desc
2025-08-14
0
34
题解 | 获取每个部门中薪水最高的员工相关信息
select dept_no, emp_no, salary from ( select dept_no, a.emp_no, salary, dense_rank() over (partition by dept_no order by salary desc) as dr ...
2025-08-14
0
28
题解 | 获取所有员工当前的manager
select a.emp_no, b.emp_no as manager from dept_emp a join dept_manager b on a.dept_no=b.dept_no and a.emp_no<>b.emp_no
2025-08-14
0
33
题解 | 获取所有员工当前的manager
select a.emp_no, b.emp_no as manager from dept_emp a join dept_manager b on a.dept_no=b.dept_no and a.emp_no not in ( select emp_no from dept_mana...
2025-08-14
0
27
题解 | 获取所有非manager的员工emp_no
select a.emp_no from employees a left join dept_manager b on a.emp_no=b.emp_no where b.emp_no is null
2025-08-14
0
37
题解 | 找出所有员工当前薪水salary情况
select distinct salary from salaries order by salary desc
2025-08-14
0
25
题解 | 查找薪水记录超过15条的员工号emp_no以及其对应的记录次数t
select emp_no, count(1) as t from salaries group by emp_no having count(1)>15
2025-08-14
0
33
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页