牛客106702533号
牛客106702533号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客106702533号的博客
全部文章
/ 题解
(共34篇)
题解 | #牛客的课程订单分析(三)#
select o.* from order_info o where user_id in (select distinct user_id from order_info where date > '2025-10-15' ...
Mysql
2021-10-05
0
320
题解 | #牛客的课程订单分析(二)#
select user_id from order_info where date > '2025-10-15' and status = 'completed' and product_name in("C++","Java","Python") group by user_id havi...
Mysql
2021-10-05
0
333
题解 | #牛客的课程订单分析(一)#
select id,user_id,product_name,status,client_id,date from order_info where status = "completed" and date > '2025-10-15' and (product_name in("C++",...
Mysql
2021-10-05
0
288
题解 | #统计salary的累计和running_total#
select s1.emp_no,s1.salary,sum(s2.salary) running_total from salaries s1 join salaries s2 on s1.emp_no >= s2.emp_no where s1.to_date = '9999-01-01...
Mysql
2021-10-05
0
275
题解 | #获取有奖金的员工相关信息。#
select eb.emp_no,e.first_name,e.last_name,eb.btype,s.salary, (case eb.btype when 1 then s.salary*0.1 when 2 then s.salary*0.2 ...
Mysql
2021-10-05
2
350
题解 | #平均工资#
select avg(salary) avg_salary from salaries where salary not in(select max(salary) from salaries where to_date = '9999-01-01') and salary not in(selec...
Mysql
2021-10-05
0
274
题解 | #在audit表上创建外键约束,其emp_no对应employees_test表的主键id#
alter table audit add CONSTRAINT hhh foreign key (emp_no) references employees_test(id);
Mysql
2021-10-05
0
300
题解 | #对first_name创建唯一索引uniq_idx_firstname#
create unique index uniq_idx_firstname on actor(first_name); create index idx_lastname on actor(last_name);
Mysql
2021-10-05
0
249
题解 | #使用子查询的方式找出属于Action分类的所有电影对应的title,description#
select title,DESCRIPTION from film where film_id in (select fc.film_id from film_category fc join category c on fc.category_id = c.categ...
Mysql
2021-10-05
0
252
题解 | #使用join查询方式找出没有分类的电影id以及名称#
select fm.film_id,fm.title from film fm left join film_category fc on fc.film_id = fm.film_id where fc.category_id is null
Mysql
2021-10-05
0
248
首页
上一页
1
2
3
4
下一页
末页