首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
Sylvie1999
获赞
25
粉丝
4
关注
25
看过 TA
78
女
河北工业大学
2025
数据分析师
IP属地:浙江
贪图快乐等于堕落
私信
关注
拉黑
举报
举报
确定要拉黑Sylvie1999吗?
发布(61)
评论
刷题
收藏
Sylvie1999
关注TA,不错过内容更新
关注
2023-09-14 15:16
河北工业大学 数据分析师
题解 | #密码游戏#
from operator import mod password=input() password=[mod((int(i)+3),9) for i in password] print(str(password[2])+str(password[3])+str(password[0])+str(password[1]))
0
点赞
评论
收藏
分享
2023-09-14 14:17
河北工业大学 数据分析师
题解 | #生成数字列表#
datas=input().split(' ') #拆分结果为["1","2",...,"5"] datas=[int(i) for i in datas] #用int替换字符串 print(datas)
0
点赞
评论
收藏
分享
2023-09-13 15:05
河北工业大学 数据分析师
题解 | #浙大不同难度题目的正确率#
select difficult_level, sum(if (result = 'right', 1, 0)) / count(qd.difficult_level) as correct_rate from question_practice_detail as qpd right join( select university, device_id from user_profile where university='浙江大学' )as up ...
0
点赞
评论
收藏
分享
2023-09-13 14:48
河北工业大学 数据分析师
题解 | #浙大不同难度题目的正确率#
select difficult_level, sum(if (result = 'right', 1, 0)) / count(qd.difficult_level) as correct_rate from question_practice_detail as qpd join( select university, device_id from user_profile where university='浙江大学' )as up on qpd...
0
点赞
评论
收藏
分享
2023-09-13 14:15
河北工业大学 数据分析师
题解 | #统计复旦用户8月练题情况#
select up.device_id, university, count(qpd.question_id) as question_cnt, sum(if(qpd.result='right',1,0)) as right_question_cnt from user_profile as up left join question_practice_detail as qpd on up.device_id = qpd.device_id and month(date)='08' where university='复旦大学' #and mo...
0
点赞
评论
收藏
分享
2023-09-12 15:49
河北工业大学 数据分析师
题解 | #找出每个学校GPA最低的同学#
select device_id, university, gpa from( select *, row_number() over(partition by university order by gpa) as rn #按照学校聚合后,将学校学生成绩升序排列保证rn=1对应的是最低分 from user_profile ) as tbl where rn=1 order by university;
0
点赞
评论
收藏
分享
2023-09-12 11:01
河北工业大学 数据分析师
题解 | #截取出年龄#
select substring_index(substring_index(profile,',',-2),',',1) as age, count(device_id) as number from user_submit group by age
0
点赞
评论
收藏
分享
2023-09-12 10:03
河北工业大学 数据分析师
题解 | #统计每种性别的人数#
select substring_index(profile,',',-1) as gender, count(*) as number #注意,这里不能是count(gender),SQL不认识‘gender’ from user_submit group by gender;
0
点赞
评论
收藏
分享
2023-09-12 09:29
河北工业大学 数据分析师
SQL难题
接上一道题目,补充一道类似的面试题:求每个用户连续登录的天数select device_id, count(date) cntfrom( select device_id, date_sub(date, interval rk day) as date #date_sub(date,interval x day/minute/month...)表示,从data里减 #x 个日期单位;相应的,还有date_add(date,interval x XXX) #如果相等,那么用户是连续登陆的 from ( ...
0
点赞
评论
收藏
分享
2023-09-11 21:32
河北工业大学 数据分析师
题解 | #计算用户的平均次日留存率#
select count(t1.date) / count(qpd.date) as avg_ret from ( select distinct device_id, date_sub(date, interval 1 day) as date from question_practice_detail ) as t1 right join ( select distinct device_id, date from qu...
0
点赞
评论
收藏
分享
2023-09-11 20:34
河北工业大学 数据分析师
题解 | #计算用户8月每天的练题数量#
select day (date), round(count(date)) as question_cnt from question_practice_detail where year (date) = 2021 and month (date) = 8 group by day (date)
0
点赞
评论
收藏
分享
2023-09-11 20:20
河北工业大学 数据分析师
题解 | #查看不同年龄段的用户明细#
select device_id, gender, case when age<20 then '20岁以下' when age>=25 then '25岁及以上' when age is null then '其他' else '20-24岁' end as age_cut from user_profile;
0
点赞
评论
收藏
分享
2023-09-11 20:13
河北工业大学 数据分析师
题解 | #计算25岁以上和以下的用户数量#
select case when age<25 or age is null then '25岁以下' else '25岁及以上' end as age_cut, count(*) as number from user_profile group by age_cut
0
点赞
评论
收藏
分享
2023-09-11 17:03
河北工业大学 数据分析师
题解 | #统计每个用户的平均刷题数#
#选择字段:原生&合成 select up.university, qd.difficult_level, round(count(main.question_id)/count(distinct main.device_id),4) as avg_answer_cnt #选择表:原生&连接。主表+连接其他表 from question_practice_detail as main inner join user_profile as up on up.device_id = main.device_id inn...
0
点赞
评论
收藏
分享
2023-09-11 11:04
河北工业大学 数据分析师
题解 | #统计每个学校的答过题的用户的平均答题数#
select university, count(question_id)/count(distinct t1.device_id) as avg_answer_cnt from question_practice_detail as t1 inner join user_profile as t2 on t1.device_id = t2.device_id group by university;
0
点赞
评论
收藏
分享
1
2
3
4
5
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客企业服务