牛客797465787号
牛客797465787号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客797465787号的博客
全部文章
/ 题解
(共28篇)
题解 | #每份试卷每月作答数和截止当月的作答总数。#
select exam_id, date_format(start_time, '%Y%m') as start_month, count(start_time) as month...
Mysql
2022-06-30
0
121
题解 | #平均活跃天数和月活人数#
select date_format(submit_time,'%Y%m') month ,round((count(distinct uid, date_format(submit_time, '%y%m%d'))/ count(distinct uid)),2) avg_...
Mysql
2022-06-24
0
142
题解 | #得分不小于平均分的最低分#
select min(e.score) min_score_over_avg from exam_record e join examination_info e1 on e.exam_id = e1.exam_id where e1.tag='SQL' and...
Mysql
2022-06-24
0
117
题解 | #统计作答次数#
select count(exam_id) total_pv , count(submit_time) complete_pv ,count(distinct if(submit_time,exam_id,null) ) complete_exam_cnt fro...
Mysql
2022-06-24
0
154
题解 | #SQL类别高难度试卷得分的截断平均值#
select tag,difficulty,round((sum(e.score)-max(e.score)-min(e.score))/ (count(e.score)-2),1) clip_avg_score from examination_info f join exam_rec...
Mysql
2022-06-24
0
138
题解 | #创建索引#
alter table examination_info add index idx_duration(duration); alter table examination_info add unique index uniq_idx_exam_id(exam_id); alter table ex...
Mysql
2022-06-24
0
151
题解 | #创建索引#
create index idx_duration on examination_info(duration); create unique index uniq_idx_exam_id on examination_info(exam_id); create fulltext inde...
Mysql
2022-06-24
0
171
题解 | #修改表#
alter table user_info add school varchar(15) after level; alter table user_info change job profession varchar(10); alter table user_info c...
Mysql
2022-06-24
0
201
题解 | #删除记录(二)#
delete from exam_record where submit_time is null &nbs***bsp; timestampdiff(minute,start_time,submit_time)<5 ...
Mysql
2022-06-24
0
121
题解 | #更新记录(二)#
update exam_record set submit_time='2099-01-01 00:00:00',score=0 where start_time <'2021-09-01 00:00:00' and submit_time is null;
Mysql
2022-06-24
0
144
首页
上一页
1
2
3
下一页
末页