OkMaid
OkMaid
全部文章
分类
题解(34)
归档
标签
去牛客网
登录
/
注册
OkMaid的博客
全部文章
(共68篇)
题解 | #修复串列了的记录#
SELECT exam_id, SUBSTRING_INDEX(tag, ',', 1), SUBSTRING_INDEX(SUBSTRING_INDEX(tag, ',', 2), ',', -1), ...
Mysql
2022-07-04
0
306
题解 | #0级用户高难度试卷的平均用时和平均得分#
select uid, round(sum(if(score is not null, score, 0))/count(start_time), ...
Mysql
2022-07-02
0
279
题解 | #统计有未完成状态的试卷的未完成数和未完成率#
select exam_id, count(start_time) - count(submit_time) as incomplete_cnt, &nbs...
Mysql
2022-07-02
0
304
题解 | #每份试卷每月作答数和截止当月的作答总数。#
select exam_id, date_format(start_time, '%Y%m') as start_month, count(start_time)&n...
Mysql
2022-06-30
0
341
题解 | #近三个月未完成试卷数为0的用户完成情况#
select uid, count(score) as exam_complete_cnt from (select uid, start_time, submit_time, score, dense_ran...
Mysql
2022-06-30
0
304
题解 | #每类试卷得分前3名#
SELECT tag,uid,ranking FROM ( SELECT b.tag,a.uid, ROW_NUMBER()OVER(PARTITION BY tag ORDER BY max(a.score) DESC,min(a.score) DESC,a.uid DESC) r...
Mysql
2022-06-29
0
301
题解 | #每个6/7级用户活跃情况#
跟着评论区一位大佬思路码的,太感谢大佬,思路豁然开朗 select u_i.uid as uid, count(distinct act_month) as act_month_total, count(distinct case when ...
Mysql
2022-06-29
0
334
题解 | #SQL类别高难度试卷得分的截断平均值#
select tag, difficulty, round(avg(score), 1)as clip_avg_score from exam_record t1 join examination_info t2 using(exam_id) where tag ='SQL' and difficu...
Mysql
2022-06-23
0
280
题解 | #删除索引#
alter table examination_info drop index uniq_idx_exam_id; alter table examination_info drop index full_idx_tag
Mysql
2022-06-12
0
260
题解 | #创建索引#
create index idx_duration on examination_info(duration); create unique index uniq_idx_exam_id on examination_info(exam_id); create fulltext index ful...
Mysql
2022-06-11
0
262
首页
上一页
1
2
3
4
5
6
7
下一页
末页