首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
强迫自学爱好者
获赞
1
粉丝
0
关注
5
看过 TA
2
四川师范大学
2018
大数据开发工程师
IP属地:四川
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑强迫自学爱好者吗?
发布(14)
评论
刷题
收藏
强迫自学爱好者
关注TA,不错过内容更新
关注
2022-12-12 15:51
已编辑
四川师范大学 大数据开发工程师
题解 | #计算用户的平均次日留存率#
第一种解法:SELECT COUNT(distinct q2.device_id, q2.date) / count(DISTINCT q1.device_id, q1.date) as avg_ret from question_practice_detail as q1 left join question_practice_detail as q2 on q1.device_id = q2.device_id and DATEDIFF(q2.date, q1.date) = 1 第二种解法:select avg(if(b.device_id is not null,1,0)) as av...
0
点赞
评论
收藏
分享
2022-12-05 15:57
已编辑
四川师范大学 大数据开发工程师
题解 | #计算用户8月每天的练题数量#
select day(date), count(*) from question_practice_detail where date_format(date,'%Y-%m')='2021-08' group by day(date);
0
点赞
评论
收藏
分享
2022-01-25 17:20
四川师范大学 大数据开发工程师
题解 | #查看不同年龄段的用户明细#
select device_id,gender, case when age>=20 and age<=24 then '20-24岁' when age>=25 then '25岁及以上' when age<20 then '20岁以下' when age is null then '其他' end age_cut from user_profile;
0
点赞
评论
收藏
分享
2022-01-25 17:15
四川师范大学 大数据开发工程师
题解 | #计算25岁以上和以下的用户数量#
with t1 as(select case when age>=25 then '25岁及以上' when age<25 or age is null then '25岁以下' end age_cut from user_profile) select t1.age_cut,count(*) from t1 group by t1.age_cut;
0
点赞
评论
收藏
分享
2022-01-24 16:44
四川师范大学 大数据开发工程师
题解 | #查找山东大学或者性别为男生的信息#
select device_id,gender,age,gpa from user_profile where university='山东大学' union all select device_id,gender,age,gpa from user_profile where gender='male';
0
点赞
评论
收藏
分享
2022-01-24 16:37
四川师范大学 大数据开发工程师
题解 | #统计每个用户的平均刷题数#
select university,difficult_level,count(t1.device_id)/count(distinct t1.device_id) from question_practice_detail t1 left join user_profile t2 on t1.device_id=t2.device_id left join question_detail t3 on t1.question_id=t3.question_id where t2.university='山东大学' group by university,difficult_level;
0
点赞
评论
收藏
分享
2022-01-21 17:04
四川师范大学 大数据开发工程师
题解 | #插入记录(一)#
insert into exam_record(uid,exam_id,start_time,submit_time,score) values(1001,9001,'2021-09-01 22:11:12','2021-09-01 23:01:12',90), (1002,9002,'2021-09-04 07:01:02',null,null);
0
点赞
评论
收藏
分享
2022-01-20 11:16
四川师范大学 大数据开发工程师
题解 | #统计每个学校各难度的用户平均刷题数#
方法一: select t2.university, t3.difficult_level, round(count(t1.device_id)/count(distinct t1.device_id),4) as avg_answer_cnt from question_practice_detail t1 left join user_profile t2 on t1.device_id=t2.device_id left join question_detail t3 on t3.question_id=t1.question_id group by t2.university,t3.d...
0
点赞
评论
收藏
分享
2022-01-20 10:30
四川师范大学 大数据开发工程师
题解 | #统计每个学校的答过题的用户的平均答题数#
select t2.university,count(t1.device_id)/count(distinct t1.device_id) from question_practice_detail t1 left join user_profile t2 on t1.device_id=t2.device_id group by t2.university;
0
点赞
评论
收藏
分享
2022-01-19 15:42
四川师范大学 大数据开发工程师
题解 | #浙江大学用户题目回答情况#
方法一: select question_practice_detail.device_id,question_id,result from question_practice_detail left join user_profile on question_practice_detail.device_id=user_profile.device_id where university ='浙江大学'; 方法二: select device_id,question_id,result from question_practice_detail where device_id in (sel...
0
点赞
评论
收藏
分享
2022-01-19 15:14
四川师范大学 大数据开发工程师
题解 | #分组过滤练习题#
select university,avg(question_cnt) as avg_question_cnt,avg(answer_cnt) as avg_answer_cnt from user_profile group by university having avg_question_cnt<5 or avg_answer_cnt<20;
0
点赞
评论
收藏
分享
2022-01-19 15:07
四川师范大学 大数据开发工程师
题解 | #分组计算练习题#
方法一: select gender,university,count(*) as user_num, avg(active_days_within_30) as avg_active_day, avg(question_cnt) as avg_question_cnt from user_profile group by gender,university; 方法二: select gender,university,count() as user_num, round(sum(active_days_within_30)/count(),1) as avg_active_day, roun...
0
点赞
评论
收藏
分享
2021-11-01 16:33
四川师范大学 大数据开发工程师
2021.11.01 在牛客打卡1天!
0
点赞
评论
收藏
分享
2021-05-09 16:12
四川师范大学 大数据开发工程师
加油
0
点赞
评论
收藏
分享
1
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客网在线编程
牛客网题解
牛客企业服务