Joneln
Joneln
全部文章
题解
专题(8)
归档
标签
去牛客网
登录
/
注册
Joneln
好好学习,天天向上。
全部文章
/ 题解
(共77篇)
题解 | #批量插入数据,不使用replace操作#
来自专栏
insert ignore into actor VALUES( '3', 'WD','GUINESS','206-02-15 12:34:33' ) 《SQL必知必会》里面没有,边练边学吧
Mysql
2021-09-27
0
304
题解 | #批量插入数据#
来自专栏
插入一条数据,可以写列名也可以不写列名 insert into actor(actor_id,first_name,last_name,last_update) VALUES (2,'NICK','WAHLBERG','2006-02-15 12:34:33'); insert into acto...
Mysql
2021-09-26
0
373
题解 | #使用子查询的方式找出属于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
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页