许愿简历通过的羚羊很爱刷美剧
许愿简历通过的羚羊很爱刷美剧
全部文章
分类
归档
标签
去牛客网
登录
/
注册
许愿简历通过的羚羊很爱刷美剧的博客
全部文章
(共37篇)
题解 | #刷题通过的题目排名#
select p.*, dense_rank() over(order by number desc) t_rank from passing_number p # 通过题目个数相同的,排名相同,此时按照id升序排列 order by t_rank, id
2023-02-03
0
249
题解 | #给出employees表中排名为奇数行
select first_name first from employees where first_name in( select first_name from ( ...
2023-02-03
0
226
题解 | #统计salary的累计和runnin
# sum(col1) over(partition by col2 order by col3 ) # 以上的函数可以理解为:按col2 进行分组(partition ),每组以col3 进行排序(order),并进行连续加总(sum) select emp_no, salary,...
2023-02-03
0
230
题解 | #获取有奖金的员工相关信息。#
select eb.emp_no, first_name, last_name, btype, salary, round ( case btype when 1 then salary*0.1 when 2 then salary*0.2 else salary*0.3 end,1) bo...
2023-02-03
0
250
题解 | #平均工资#
select avg(salary) avg_salary from salaries where to_date = '9999-01-01' and salary not in ( # 找到max和min select max(salary) from salaries ...
2023-02-03
0
0
题解 | #将id=5以及emp_no=10001的行数据
update titles_test set emp_no = replace(emp_no,10001,10005) where id = 5 转载
2023-02-02
0
225
题解 | #针对actor表创建视图actor_name
# 方法一 /* create view actor_name_view as select first_name as first_name_v, last_name as last_name_v from actor */ create view actor_name_view(first_na...
2023-02-02
0
171
题解 | #对first_name创建唯一索引uniq_i
# 两种方法 /*第一种 create unique index uniq_idx_firstname on actor(first_name); create index idx_lastname on actor(last_name); */ # 第二种 alter table actor ad...
2023-02-02
0
211
题解 | #创建一个actor_name表#
/* 1、常规创建:create table if not exists table_name(); 2、复制表格:create table table_name like table_name1; 3、将table1的部分拿来创建table2:create teble if not exists ...
2023-02-02
0
233
题解 | #批量插入数据,不使用replace操作#
# 转载:mysql中常用的三种插入数据的语句: # insert into表示插入数据,数据库会检查主键,如果出现重复会报错; # replace into表示插入替换数据,需求表中有PrimaryKey, # 或者unique索引,如果数据库已经存在数据,则用新数据替换,...
2023-02-02
0
226
首页
上一页
1
2
3
4
下一页
末页