LY_coder
LY_coder
全部文章
分类
题解(29)
归档
标签
去牛客网
登录
/
注册
LY_coder的博客
全部文章
(共14篇)
题解 | #统计作答次数#
根据不同的exam_id,score不为空查询 select count(id) as total_pv, count(score) as complete_pv, count(distinct exam_id...
Mysql
2022-02-16
0
241
题解 | #删除记录(二)#
order by limit delete from exam_record where submit_time is NULL&nbs***bsp;TIMESTAMPDIFF(minute,start_time,submit_...
Mysql
2022-02-14
0
293
题解 | #删除记录(一)#
*知识点:TIMESTAMPDIFF时间比较函数的应用。BUT我不会 delete from exam_record where TIMESTAMPDIFF(minute,start_time,submit_time) < 5 a...
Mysql
2022-02-14
0
255
题解 | #更新记录(二)#
根据条件 start_time 和 submit_time update exam_record set score = 0,submit_time = '2099-01-01 00:00:00' where sta...
Mysql
2022-02-14
0
296
题解 | #各个视频的平均完播率#
1.视频完播率:完成播放次数占总播放次数的比例。完成播放:结束观看时间与开始播放时间的差 >= 视频时长。 sum(if(tu.end_time-tu.start_time>=tv.duration,1,0))/count(*) 2.连接两张表 left ...
Mysql
2021-12-03
1
700
题解 | #统计复旦用户8月练题情况#
1.left join 左边的表全部保留,可以留下八月份没有做题的学生 2.sum(if(result = 'right',1,0)) 答题正确,进行累加计数 3.gr...
Mysql
2021-11-30
0
302
题解 | #找出每个学校GPA最低的同学#
1.group by university 根据大学分组 2.university = u.university 把大学传进去 3.min(gpa) 返回当前大学的 4.gpa = () 进行gpa匹配 select device_id,unive...
Mysql
2021-11-27
3
338
题解 | #统计每个学校各难度的用户平均刷题数#
1.两张小表先关联 2.再和 user_profile表关联 3.分组 group by university,difficult_level 4.count(questio...
Mysql
2021-11-27
0
329
题解 | #浙江大学用户题目回答情况#
1.子查询 select device_id,question_id,result from question_practice_detail where device_id IN (select device_id &nb...
Mysql
2021-11-27
15
652
题解 | #更新记录(一)#
update update examination_info set tag = 'Python' where tag = 'PYTHON'
Mysql
2021-11-25
0
390
首页
上一页
1
2
下一页
末页