人生苦短,但求成长
人生苦短,但求成长
全部文章
题解
归档
标签
去牛客网
登录
/
注册
人生苦短,但求成长的博客
全部文章
/ 题解
(共86篇)
题解 | #月均完成试卷数不小于3的用户爱作答的类别#题目有歧义,当月均完成数定义不清
select tag,count(1) as tag_cnt from exam_record t1 join examination_info t2 on t1.exam_id = t2.exam_...
Mysql
2022-03-13
1
236
题解 | #未完成试卷数大于1的有效用户#主要是group_concat函数的用法
select uid, sum(if(submit_time is null,1,0)) as incomplete_cnt, ...
Mysql
2022-03-13
2
539
题解 | #未完成试卷数大于1的有效用户#题目说的不清不楚的,可以把两段和成一段
select t1.uid,incomplete_cnt,complete_cnt,detail from ( select  ...
Mysql
2022-03-13
3
388
题解 | #月总刷题数和日均刷题数#主要是求每个月总有多少天
select * from ( select date_format(submit_time,'%Y%m') as submit_month,  ...
Mysql
2022-03-13
10
446
题解 | #平均活跃天数和月活人数#注意求活跃天数时要把用户和日期去重
select date_format(start_time,'%Y%m') as month, round(count(distinct uid,date_for...
Mysql
2022-03-13
1
390
题解 | #得分不小于平均分的最低分#不小于就用大于或等于
select min(score) as min_score_over_avg from exam_record t1 join examination_info t2 on t1.exam_id ...
Mysql
2022-03-13
2
329
题解 | #统计作答次数#
select count(1) as total_pv, sum(if(score is not null,1,0)) ...
Mysql
2022-03-13
2
308
题解 | #SQL类别高难度试卷得分的截断平均值#
select tag,difficulty,round(avg(score),1) as clip_avg_score from( select tag,difficulty,score,  ...
Mysql
2022-03-13
1
353
题解 | #删除索引#
drop index uniq_idx_exam_id on examination_info; drop index full_idx_tag on examination_info;
Mysql
2022-03-13
1
248
题解 | #创建索引#
create index idx_duration on examination_info(duration); create unique index uniq_idx_exam_id on examinat...
Mysql
2022-03-13
1
310
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页