莫凡的ID
莫凡的ID
全部文章
分类
题解(22)
归档
标签
去牛客网
登录
/
注册
莫凡的ID的博客
全部文章
(共20篇)
题解 | #统计作答次数#
分析题目 题目条件: 三个概念,已完成,未完成,已做答的题目 初始提交版本:只利用了字段exam_id select total_pv ,complete_pv,complete_exam_cnt from (select count(exam_id) as total_pv from exam_...
Mysql
2022-04-12
1
393
题解 | #SQL类别高难度试卷得分的截断平均值#
分析题目 题目条件: SQL中高难度,所以筛选条件为 where difficulty ='hard' and tag='SQL' 难点1. 截断平均值 (sum(score)-max(score)-min(score))/(count(score)-2) 难点2. 保留一位小数 round(.....
Mysql
2022-04-12
0
317
题解 | #修改表#
alter table user_info add column school varchar(15) after level; alter table user_info change column job profession varchar(10); alter table user_info...
Mysql
2022-04-11
0
282
题解 | #创建一张新表#
create table if not exists user_info_vip( id int primary key auto_increment comment '自增ID', uid int unique not null comment'用户ID', nick_name varchar...
Mysql
2022-04-11
0
287
题解 | #删除记录(三)#
truncate table nowcoder_exam_record #删除表中内容 除了用delete 外还有truncate table 表名 区别: 1.truncate的速度快,效率高,不能+where 表示清空表中所有的数据 2.truncate 删除后再插入值时自增长列从1开始,而...
Mysql
Mysql
2022-04-07
2
445
题解 | #插入记录(二)#
法一: delete from examination_info where exam_id =9003; insert into examination_info (exam_id ,tag ,difficulty ,duration,release_time ) values(9003,"SQ...
Mysql
2022-03-31
0
285
题解 | #插入记录(二)#
insert into exam_record_before_2021 (uid ,exam_id ,start_time,submit_time,score ) select uid ,exam_id ,start_time,submit_time,score from exam_record...
Mysql
2022-03-31
0
264
题解 | #将两个 SELECT 语句结合起来(一)#
select * from OrderItems where quantity=100 union select * from OrderItems where prod_id like 'BNBG%' order by prod_id #联合查询用于查询多表并且返回结果一致 #通配符like的...
Mysql
2022-03-31
0
248
题解 | #返回顾客名称和相关订单号以及每个订单的总价#
select c.cust_name , t.order_num, t.OrderTotal from Customers c join Orders o on c.cust_id =o.cust_id join (select order_num ,sum( quantity *item_pric...
Mysql
2022-03-29
0
324
题解 | #查找入职员工时间排名倒数第三的员工所有信息#
SELECT * from employees order by hire_date DESC LIMIT 2,1 ---limit表示从第三行取一条数据---order by +列名+desc/asc
Mysql
2021-09-15
1
297
首页
上一页
1
2
下一页
末页