Joneln
Joneln
全部文章
分类
专题(8)
题解(77)
归档
标签
去牛客网
登录
/
注册
Joneln
好好学习,天天向上。
TA的专栏
85篇文章
0人订阅
MySQL试题答案解析
77篇文章
7380人学习
MySQL专题学习
8篇文章
360人学习
全部文章
(共85篇)
题解 | #使用子查询的方式找出属于Action分类的所有电影对应的title,description#
来自专栏
select title, description from film where film_id in (select film_id from film_category where category_id in (select category_id from category where n...
Mysql
2021-09-26
0
479
题解 | #查找描述信息中包含robot的电影对应的分类名称以及电影数目,而且还需要该分类对应电影数量>=5部#
来自专栏
select name, r_count from (select category_id,count(f.film_id) as r_count from film as f inner join film_category as fc on f.film_id = fc.film_id wh...
Mysql
2021-09-26
0
515
题解 | #汇总各个部门当前员工的title类型的分配数目#
来自专栏
select d.dept_no, dept_name, title, count from departments as d right outer join (select dept_no, title, count(title) as count from titles as t left o...
Mysql
2021-09-26
1
386
题解 | #获取员工其当前的薪水比其manager当前薪水还高的相关信息#
来自专栏
评价“华科平凡不?”同学的解题思路 # 来自“华科平凡不?” select d.emp_no, de.emp_no as manager_no, s.salary as emp_salary, se.salary as manager_salary from dept_emp as d, de...
Mysql
2021-09-25
0
352
题解 | #获取员工其当前的薪水比其manager当前薪水还高的相关信息#
来自专栏
select e_emp_no, m_emp_no, e_salary, m_salary from (select e_emp_no, salary as e_salary, dept_no from salaries as s, (select e.emp_no as e_emp_no,...
Mysql
2021-09-25
0
423
题解 | #获取所有非manager员工当前的薪水情况#
来自专栏
select dept_emp.dept_no, employees.emp_no, salary from employees inner join salaries on employees.emp_no = salaries.emp_no inner join dept_emp on emp...
Mysql
2021-09-25
1
466
题解 | #对所有员工的薪水按照salary降序进行1-N的排名#
来自专栏
select emp_no, salary, DENSE_RANK() over(order by salary desc) as t_rank from salaries ORDER BY t_rank, emp_no; 这道题最难的地方在于,之前没有学过排名函数。 下面介绍几种排名方法。 --...
Mysql
2021-09-25
0
353
题解 | #统计各个部门的工资记录数#
来自专栏
select dept_no, count(salary) as sum from salaries left outer join dept_emp on salaries.emp_no = dept_emp.emp_no group by dept_no; select ds.dept_no,...
Mysql
2021-09-25
0
497
题解 | #查找在职员工自入职以来的薪水涨幅情况#
来自专栏
select emp_no, salary from salaries where to_date = '9999-01-01'; select employees.emp_no, salary from salaries, employees where salaries.emp_no = em...
Mysql
2021-09-24
1
527
题解 | #查找所有员工的last_name和first_name以及对应的dept_name#
来自专栏
select employees.emp_no as emp_no, dept_no, last_name, first_name from employees left outer join dept_emp on employees.emp_no = dept_emp.emp_no; sele...
Mysql
2021-09-24
0
427
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页