请求转运的弟弟
请求转运的弟弟
全部文章
分类
题解(15)
归档
标签
去牛客网
登录
/
注册
瓜皮炒肉的博客
欢迎来到神奇世界~
全部文章
(共15篇)
题解 | #统计每个学校的答过题的用户的平均答题数#
SELECT up.university, count(question_id)/count(distinct qpd.device_id) as avg_answer_cnt from user_profile AS up inner join question_practice_detail A...
Mysql
2021-11-05
0
341
题解 | #浙江大学用户题目回答情况#
select question_practice_detail.device_id, question_practice_detail.question_id, question_practice_detail.result FROM question_practice_detail inner ...
Mysql
2021-11-01
1
532
题解 | #分组排序练习题#
select university, //表头的University AVG(question_cnt) AS avg_question_cnt //表头的avg_question_cnt来源与平均值 FROM user_profile//不要遗漏不要遗漏不要遗漏不要遗漏不要遗漏 group by ...
Mysql
2021-11-01
2
447
题解 | #分组过滤练习题#
select university, avg(question_cnt) AS avg_question_cnt, AVG(answer_cnt) AS avg_answer_cnt FROM user_profile GROUP BY university HAVING avg(questio...
Mysql
2021-10-29
0
394
题解 | #分组计算练习题#
SELECT gender, university, //表头的性别和学校 COUNT(university) AS user_num, //用户数 ROUND(AVG(active_days_within_30),1) AS avg_active_day, //平均活跃数,保留一位小数 ROUND...
Mysql
2021-10-29
10
665
题解 | #计算男生人数以及平均GPA#
SELECT COUNT(gender) AS male_num, ROUND(AVG(gpa),1) AS avg_gpa FROM user_profile WHERE gender='male' 读题:计算人数,用count()函数,统计平均值,用avg()函数,限定男生,where语句限定...
Mysql
2021-10-28
0
608
题解 | #查找GPA最高值#
select max(gpa ) AS gpa from user_profile WHERE university='复旦大学' 另一种写法是select gpa from user_profile where university='复旦大学' order by gpa desc limit...
Mysql
2021-10-28
0
481
题解 | #查看学校名称中含北京的用户#
SELECT device_id, age, university FROM user_profile WHERE university LIKE '%北京%' 学会like操作符的各种用法,选取 name 包含模式 "oo" 的所有客户: SELECT * FROM Websites WHERE...
Mysql
2021-10-28
0
406
题解 | #操作符混合运用#
SELECT device_id, gender, age, university, gpa FROM user_profile WHERE (gpa>3.5 and university='山东大学') OR (gpa>3.8 and university= '复旦大学') 需要加深...
Mysql
2021-10-28
0
324
题解 | #高级操作符练习(1)#
SELECT device_id, gender, age, university, gpa from user_profile WHERE gpa>3.5 and gender = 'male' 一定要看清题目,关键条件男性和3.5以上,缺一不可,同时gender列数据类型为字符型,gpa...
Mysql
2021-10-27
0
439
首页
上一页
1
2
下一页
末页