想到就去做
想到就去做
全部文章
分类
题解(78)
归档
标签
去牛客网
登录
/
注册
想到就去做的博客
全部文章
(共41篇)
题解 | #查找排除当前最大、最小salary之后的员工的平均工资avg_salary#
select avg(salary) as avg_salaryfrom salarieswhere to_date = '9999-01-01'and salary not in (select min(salary) from salaries where t...
2021-08-25
1
481
题解 | #对first_name创建唯一索引uniq_idx_firstname#
drop table if exists actor;CREATE TABLE actor ( actor_id smallint(5) NOT NULL PRIMARY KEY, first_name varchar(45) NOT NULL, last_name varch...
2021-08-23
0
348
题解 | #创建一个actor_name表#
drop table if exists actor_name;create table actor_name( first_name varchar(45) not null comment'名字', last_name varchar(45) not null comment'姓氏'...
2021-08-23
0
314
题解 | #批量插入数据,不使用replace操作#
drop table if exists actor;CREATE TABLE actor ( actor_id smallint(5) NOT NULL PRIMARY KEY, first_name varchar(45) NOT NULL, last_name varcha...
2021-08-23
0
0
题解 | #创建一个actor表,包含如下列信息#
CREATE TABLE actor ( actor_id smallint(5) NOT NULL PRIMARY KEY, first_name varchar(45) NOT NULL, last_name varchar(45) NOT NULL, last_upda...
2021-08-22
0
483
题解 | #使用子查询的方式找出属于Action分类的所有电影对应的title,description#
select f.title,f.descriptionfrom film f join (select c.name,fc.film_id from category c left join film_category fc on...
2021-08-22
0
311
题解 | #统计各个部门的工资记录数#
select d.dept_no,d.dept_name,count(s.salary) as sumfrom dept_emp deleft join departments d on de.dept_no = d.dept_noleft join salaries s on de.emp_no=...
2021-08-21
0
271
题解 | #查找所有员工的last_name和first_name以及对应的dept_name#
select e.last_name,e.first_name,d.dept_namefrom employees eleft join dept_emp de on e.emp_no = de.emp_noleft join departments d on de.dept_no = d.dept...
2021-08-21
0
368
题解 | #获取所有员工当前的manager#
select de.emp_no,dm.emp_no as managerfrom dept_emp de inner join dept_manager dmon de.dept_no = dm.dept_nowhere de.emp_no != dm.emp_no;
2021-08-21
1
297
题解 | #牛客的课程订单分析(一)#
select *from order_infowhere status = 'completed'and product_name in ('C++','Java','Python')and date >= '2025-10-15'order by id;
2021-08-18
1
448
首页
上一页
1
2
3
4
5
下一页
末页