老北京2018
老北京2018
全部文章
分类
题解(11)
归档
标签
去牛客网
登录
/
注册
老北京2018的博客
全部文章
(共5篇)
题解 | #近三个月未完成试卷数为0的用户完成情况#
写点不一样的解法 uid, exam_complete_cnt from ( select r.uid, sum(submit_time is not null) exam_complete_cnt from exam_record r where (uid, date_fo...
Mysql
2021-11-25
0
402
题解 | #连续两次作答试卷的最大时间窗#
select a.uid, days_window, round(b.`avg` * a.days_window, 2)avg_exam_cnt from ( select uid, max(days_window)days_window from ( select u...
Mysql
2021-11-24
0
411
题解 | #获得积分最多的人(二)#
select g.user_id, u.name, g.grade_num from ( select user_id, sum(grade_num) grade_num from `grade_info` group by user_id)g left join `use...
Mysql
2021-10-15
0
413
题解 | #商品交易(网易校招笔试真题)#
select g.id,g.name,g.weight,t.total from goods g left join (select goods_id,sum(count) total from trans group by goods_id) t on g.id = t.goods_id wh...
Mysql
2021-10-15
0
326
题解 | #浙大不同难度题目的正确率#
select d.difficult_level,sum(if(pd.`result`='right',1,0))/count(1) correct_rate from (select device_id from user_profile where university = '浙江大学') u ...
Mysql
2021-10-11
0
317