Y-David
Y-David
全部文章
分类
题解(6)
归档
标签
去牛客网
登录
/
注册
Y-David的博客
全部文章
(共6篇)
题解 | #分组过滤练习题#
1、HAVING select university, avg(question_cnt) as avg_question_cnt, avg(answer_cnt) as avg_answer_cnt from user_profile...
Mysql
2022-01-18
0
224
题解 | #计算男生人数以及平均GPA#
1、COUNT计数 AVG平均数 ROUND四舍五入(可控制几位小数) SELECT COUNT(gender) AS male_num, ROUND(avg(gpa),1) AS avg_gpa FROM user_profile WHERE&...
Mysql
2022-01-18
0
243
题解 | #查找GPA最高值#
1、MAX SELECT MAX(gpa) FROM user_profile WHERE university = '复旦大学' 2、ORDER BY SELECT gpa FROM user_profile WHERE&n...
2022-01-18
0
151
题解 | #查看学校名称中含北京的用户#
1、REGEXP SELECT device_id, age, university FROM user_profile WHERE university REGEXP "北京" 2、LIKE SELECT d...
2022-01-18
7
285
题解 | #查找某个年龄段的用户信息#
1.between列值之间 select device_id,gender,age from user_profile where age between 20 and 23 2.and条件连接 select&...
Mysql
2022-01-15
0
218
题解 | #查询结果去重#
1、distinct select distinct university from user_profile (distinct去重,放在列的前面使用) 2、group by select univers...
Mysql
2022-01-15
1
182