平平无奇的灌木丛
平平无奇的灌木丛
全部文章
分类
题解(32)
归档
标签
去牛客网
登录
/
注册
杨硕琦太调皮了
倘若你的眼神一直这么冰冷,某人的心会结冰的
TA的专栏
0篇文章
0人订阅
学习记录
0篇文章
0人学习
全部文章
(共30篇)
题解 | #插入记录(三)#
当表中已经存在某条数据 现在想要插入一条新的覆盖他 可以 update 修改它 可以 delete 删除再添加 可以 replace 替代它 # 方法一 # delete from examination_info where exam_id = 9003; # insert into examin...
Mysql
2022-01-12
0
288
题解 | #插入记录(二)#
复制一张表的数据到另外一个结构完全一样的表中 自增id列用null insert into exam_record_before_2021 select null, uid, exam_id, start_time, submit_time, score from exam_record wher...
Mysql
2022-01-12
0
249
题解 | #浙大不同难度题目的正确率#
(sum(case when qpd.result = 'right' then 1 else 0 end) / count(qpd.result)) as correct_rated select qd.difficult_level, (sum(case when qpd.result = ...
Mysql
2022-01-11
0
443
题解 | #21年8月份练题总数#
select count(distinct device_id) as did_cnt, count(question_id) as question_cnt from question_practice_detail where year(date) = 2021 and month(date)...
Mysql
2022-01-11
0
317
题解 | #统计复旦用户8月练题情况#
sum(if(qpd.result = 'right', 1, 0) as right_question_cnt) select up.device_id, up.university, count(question_id) as question_cnt, sum(if(qpd.r...
Mysql
2022-01-11
0
330
题解 | #找出每个学校GPA最低的同学#
方法一:left join select p.device_id, u.university, u.gpa from (select university, min(gpa) as gpa from user_profile group by university) u left join user...
Mysql
2022-01-11
0
319
题解 | #截取出年龄#
select SUBSTRING_INDEX(SUBSTRING_INDEX(PROFILE, ',', -2), ',', 1) as age, count(*) as number from user_submit group by age; substring_index() 受到上...
Mysql
2022-01-11
0
323
题解 | #统计每种性别的人数#
SELECT substring_index(profile, ',', -1) as gender, COUNT(*) AS number FROM user_submit group by gender;
Mysql
2022-01-11
0
287
题解 | #计算用户的平均次日留存率#
select count(b.device_id) / count(a.device_id) from ( select distinct device_id, date from question_practice_detail ) as a left join ( sel...
Mysql
2022-01-11
0
277
题解 | #计算用户8月每天的练题数量#
select day(date) as day, count(question_id) as question_cnt from question_practice_detail where month(date) = 8 group by date day month year 从日期中分别取出...
Mysql
2022-01-11
0
267
首页
上一页
1
2
3
下一页
末页