首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
牛客309266415号
获赞
5
粉丝
0
关注
0
看过 TA
16
数据分析师
IP属地:浙江
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑牛客309266415号吗?
发布(22)
评论
刷题
收藏
牛客309266415号
关注TA,不错过内容更新
关注
2023-08-29 18:37
数据分析师
题解 | #统计每个学校各难度的用户平均刷题数#
select university,difficult_level,count(c.question_id)/count(distinct b.device_id) from (select device_id,university from user_profile)a join (select device_id,question_id from question_practice_detail)b on a.device_id=b.device_id join question_detail c on b.question_id=c.question_id group by un...
0
点赞
评论
收藏
分享
2023-08-29 17:01
数据分析师
题解 | #统计每个学校的答过题的用户的平均答题数#
select university,count(question_id)/count(distinct question_practice_detail.device_id) from question_practice_detail, user_profile where question_practice_detail.device_id=user_profile.device_id group by university 连接操作,左连接(...left join ... on)右连接(...right join... on)内连接(... join ... on)select后跟...
0
点赞
评论
收藏
分享
2023-08-29 16:46
数据分析师
题解 | #浙江大学用户题目回答情况#
select device_id,question_id,result from question_practice_detail where device_id in( select device_id from user_profile where university='浙江大学' ) 嵌套查询:一个查询的结果作为另一个查询的条件
0
点赞
评论
收藏
分享
2023-08-29 11:41
数据分析师
题解 | #分组排序练习题#
select university,avg(question_cnt) from user_profile group by university order by avg(question_cnt); 注意:分组要在排序之前
0
点赞
评论
收藏
分享
2023-08-29 11:37
数据分析师
题解 | #分组过滤练习题#
select university,avg(question_cnt) avg_question_cnt,avg(answer_cnt) avg_answer_cnt from user_profile group by university having avg(question_cnt)<5 or avg(answer_cnt)<20; 分组过滤分组后利用having判断哪些组符合要求
0
点赞
评论
收藏
分享
2023-08-29 11:21
数据分析师
题解 | #分组计算练习题#
select gender,university,count(gender),avg(active_days_within_30),avg(question_cnt) from user_profile group by university,gender; group by 可以多级分组
0
点赞
评论
收藏
分享
2023-08-29 11:10
数据分析师
题解 | #计算男生人数以及平均GPA#
select count(*),round(avg(gpa),1) from user_profile where gender='male'; 1count(*)和count(列名)之间的区别2对输出结果四舍五入借助roung(avg(列名),2)
0
点赞
评论
收藏
分享
2023-08-29 11:01
数据分析师
题解 | #21年8月份练题总数#
select count(distinct device_id),count(question_id) from question_practice_detail where question_practice_detail.date like '2021-08%'; 1count()计数2distinct 去重3like用于模糊字段比较
0
点赞
评论
收藏
分享
2023-08-29 10:50
数据分析师
题解 | #查找后多列排序#
select device_id,gpa,age from user_profile order by gpa asc ,age asc; 我的报错是在gpa和age顺序更换就报错了
0
点赞
评论
收藏
分享
2023-08-29 10:35
数据分析师
题解 | #查找后排序#
select device_id,age from user_profile order by age asc; 1order by是对结果进行排序2asc表示升序,desc表示为降序
0
点赞
评论
收藏
分享
2023-08-24 19:11
数据分析师
题解 | #查看学校名称中含北京的用户#
select device_id,age,university from user_profile where university like '%北京%'; 条件筛选时若是模糊项含(%通配符)用like
0
点赞
评论
收藏
分享
2023-08-24 19:05
数据分析师
题解 | #操作符混合运用#
select device_id,gender,age,university,gpa from user_profile where (gpa>3.5 and university='山东大学') or (gpa>3.8 and university='复旦大学'); 多条件筛选可以借用()来表达优先级
0
点赞
评论
收藏
分享
2023-08-24 19:01
数据分析师
题解 | #Where in 和Not in#
select device_id,gender,age,university,gpa from user_profile where university in ('北京大学','复旦大学','山东大学'); 考察in/ not in用法
0
点赞
评论
收藏
分享
2023-08-24 18:53
数据分析师
题解 | #高级操作符练习(2)#
select device_id,gender,age,university,gpa from user_profile where university='北京大学' or gpa>3.7; 或者用or
0
点赞
评论
收藏
分享
2023-08-24 18:34
数据分析师
题解 | #高级操作符练习(1)#
select device_id,gender,age,university,gpa from user_profile where gpa>3.5 and gender='male'; 多条件查询且用and ,或者用or
0
点赞
评论
收藏
分享
1
2
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客企业服务