lahm66
lahm66
全部文章
分类
归档
标签
去牛客网
登录
/
注册
lahm66的博客
全部文章
(共116篇)
题解 | 统计每个学校各难度的用户平均刷题数
select university,difficult_level,round(count(qpd.question_id)/count(distinct qpd.device_id),4) avg_answer_cn from user_profile up join question_pract...
2025-10-18
1
14
题解 | 统计每个学校的答过题的用户的平均答题数
select university,round(count(question_id)/count(distinct qpd.device_id),4)avg_answer_cnt from user_profile up join question_practice_detail qpd on u...
2025-10-16
1
10
题解 | 浙江大学用户题目回答情况
select device_id,question_id,result from question_practice_detail where device_id in ( select device_id from user_profile where university...
2025-10-16
1
14
题解 | 分组排序练习题
select university,round(avg(question_cnt),4) avg_question_cnt from user_profile group by university order by avg_question_cnt;
2025-10-15
1
13
题解 | 分组过滤练习题
select university,round(avg(question_cnt),3) avg_question_cnt,round(avg(answer_cnt),3) avg_answer_cnt from user_profile group by university having avg...
2025-10-15
1
12
题解 | 分组计算练习题
select gender,university,count(*) user_num,round(avg(active_days_within_30),1) avg_active_day,round(avg(question_cnt),1) avg_question_cnt from user_pr...
2025-10-15
1
10
题解 | 电话号码格式校验
select id,name,phone_number from contacts where phone_number regexp '^[1-9][0-9]{9}$' or phone_number regexp '^[1-9][0-9]{2}-[0-9]{3}-[0-9]{4}$';
2025-10-15
0
13
题解 | 计算男生人数以及平均GPA
select count(*) male_num,avg(gpa) avg_gpa from user_profile where gender='male';
2025-10-14
0
11
题解 | 查找GPA最高值
select gpa from user_profile where university='复旦大学' order by gpa desc limit 0,1; # 第二种 select max(gpa) gpa from user_profile where university='复旦大学'
2025-10-14
1
11
题解 | 查看学校名称中含北京的用户
_:匹配任意一个字符%:匹配0个或多个字符 select device_id,age,university from user_profile where university like '%北京%';
2025-10-13
1
12
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页