首页
题库
公司真题
专项练习
面试题库
在线编程
面试
面试经验
AI 模拟面试
简历
求职
学习
基础学习课
实战项目课
求职辅导课
专栏&文章
竞赛
我要招人
发布职位
发布职位、邀约牛人
更多企业解决方案
AI面试、笔试、校招、雇品
HR免费试用AI面试
最新面试提效必备
登录
/
注册
竹本笔繁
获赞
1
粉丝
0
关注
0
看过 TA
0
菏泽学院
2009
项目经理
IP属地:山东
暂未填写个人简介
私信
关注
拉黑
举报
举报
确定要拉黑竹本笔繁吗?
发布(52)
评论
刷题
收藏
竹本笔繁
关注TA,不错过内容更新
关注
2023-08-01 10:14
菏泽学院 项目经理
题解 | #返回更多的产品#
select distinct order_num from OrderItems where quantity >=100;
0
点赞
评论
收藏
分享
2023-07-28 09:34
菏泽学院 项目经理
题解 | #对过长的昵称截取处理#
select uid, if(char_length(nick_name)>13, concat(left(nick_name,10),"..."),nick_name) as `nick_name` from user_info where char_length(nick_name)>10;
0
点赞
评论
收藏
分享
2023-07-28 09:19
菏泽学院 项目经理
题解 | #每份试卷每月作答数和截止当月的作答总数。#
select *,#第二步:试卷内按日期排序累计试卷作答记录 sum(month_cnt) over(partition by exam_id order by start_month rows between unbounded preceding and current row) cum_exam_cnt from(#第一步:统计每个试卷各月的作答数 select exam_id,date_format(start_time,"%Y%m") start_month, count(exam_id) month_cnt from exam_record group...
0
点赞
评论
收藏
分享
2023-07-28 08:59
菏泽学院 项目经理
题解 | #每类试卷得分前3名#
select * from( #第二步:在第一步基础上分试卷类型标行号 select tag,uid,row_number() over(partition by tag) ranking from(#第一步:统计每类试卷各用户的最高分最低分并排序 select tag,uid,max(score) max_score,min(score) min_score from examination_info ei join exam_record er on ei.exam_id =er.exam_id and score is not null group by...
0
点赞
评论
收藏
分享
2023-07-25 09:13
菏泽学院 项目经理
题解 | #月总刷题数和日均刷题数#
select date_format(submit_time,'%Y%m') submit_month, count(question_id) month_q_cnt, round(count(question_id)/day(last_day(max(submit_time))),3) avg_day_cnt from practice_record where year(submit_time) =2021 group by date_format(submit_time,'%Y%m') union select "2021汇总",count(question_id)...
0
点赞
评论
收藏
分享
2023-07-22 15:48
菏泽学院 项目经理
题解 | #统计复旦用户8月练题情况#
select up.device_id, university, count(question_id) as question_cnt, sum(if(`result` ="right",1, 0)) right_question_cnt from user_profile up left join question_practice_detail qpd on qpd.device_id = up.device_id and month(`date`) =8 where up.university = "复旦大学" #and month(...
0
点赞
评论
收藏
分享
2023-07-22 15:17
菏泽学院 项目经理
题解 | #统计复旦用户8月练题情况#
select device_id ,university , count(`result`) question_cnt, #count计算时null不计数,可以直接计算 sum(if(`result`="right",1,0)) right_question_cnt #判断right得1,wrong得0,求和 from ( select sub.device_id ,university ,`result` from question_practice_detail qpd right join ( select device_id ,university ...
0
点赞
评论
收藏
分享
2023-07-22 14:36
菏泽学院 项目经理
题解 | #找出每个学校GPA最低的同学#
select device_id ,university ,gpa from user_profile where (university,gpa) in (select university,min(gpa) from user_profile group by university) order by university ;
0
点赞
评论
收藏
分享
2023-07-22 14:26
菏泽学院 项目经理
题解 | #找出每个学校GPA最低的同学#
select device_id ,u.university ,gpa from user_profile u inner join ( select university,min(gpa) zuixiao from user_profile group by university ) as sub on sub.university = u.university and sub.zuixiao = u.gpa order by u.university;
0
点赞
评论
收藏
分享
2023-07-22 14:15
菏泽学院 项目经理
题解 | #截取出年龄#
select substring_index(substring_index(profile,',',-2),',',1) age, count(substring_index(substring_index(profile,',',-2),',',1)) `number` from user_submit group by age;
0
点赞
评论
收藏
分享
2023-07-22 12:10
菏泽学院 项目经理
题解 | #统计每种性别的人数#
select substring_index(profile,',',-1) gender, count(substring_index(profile,',',-1)) `number` from user_submit group by gender;
0
点赞
评论
收藏
分享
2023-07-22 11:49
菏泽学院 项目经理
题解 | #计算用户的平均次日留存率#
select round(count(间隔天数)/count(`date`),4) avg_ret from( select device_id,`date`, if(datediff(`date`,lag(`date`) over(partition by device_id order by `date`))=1,1,null) 间隔天数 from question_practice_detail group by device_id,`date` ) as 计算间隔天数 ;
0
点赞
评论
收藏
分享
2023-07-22 11:19
菏泽学院 项目经理
题解 | #计算用户8月每天的练题数量#
select day(`date`) `day`, count(device_id) question_cnt from question_practice_detail where year(`date`) = 2021 and month(`date`) = 8 group by `day`;
0
点赞
评论
收藏
分享
2023-07-22 11:12
菏泽学院 项目经理
题解 | #查看不同年龄段的用户明细#
select device_id,gender, case when age < 20 then "20岁以下" when age between 20 and 24 then "20-24岁" when age >=25 then "25岁及以上" else "其他" end as age_cut from user_profile;
0
点赞
评论
收藏
分享
2023-07-22 11:07
菏泽学院 项目经理
题解 | #计算25岁以上和以下的用户数量#
select if(age<25 or age is null ,"25岁以下","25岁及以上") age_cut, count(device_id) from user_profile group by age_cut;
0
点赞
评论
收藏
分享
1
2
3
4
创作者周榜
更多
关注他的用户也关注了:
牛客网
牛客企业服务