bbbbadboyzf
bbbbadboyzf
全部文章
分类
归档
标签
去牛客网
登录
/
注册
bbbbadboyzf的博客
全部文章
(共10篇)
题解 | #发送offer#
import sys for line in sys.stdin: a = line.split() print(int(a[0]) + int(a[1])) offer_list = ["Allen", "Tom"] for i in offer_list: print...
2023-03-30
0
327
题解 | #未完成率较高的50%用户近三个月答卷情况#
select uid,start_month,total_cnt,complete_cnt from (select uid, date_format(start_time,'%Y%m') as start_month, rank() over (partition by ...
2023-03-14
0
202
题解 | #近三个月未完成试卷数为0的用户完成情况#
select uid,sum(ans2) as exam_complete_cnt from (select uid,date_format(start_time,"%Y%m") as u_month, dense_rank() over(partition by uid order by date...
2023-03-10
0
230
题解 | #连续两次作答试卷的最大时间窗#
select uid, (max(datediff(next_time,start_time)) + 1) as days_window, round(count(uid) / (datediff(max(start_time),min(start_time)) + 1) * (max(datedi...
2023-03-06
0
259
题解 | #第二快/慢用时之差大于试卷时长一半的试卷#
select exam_id,duration,release_time from (select exam_id, sum(case when rnk1=2 then ans_time else 0 end ) max_ans, sum(case when rnk2=2 then ...
2023-03-03
0
289
题解 | #每类试卷得分前3名#
select * from ( select tag as tid, uid, row_number() over (partition by tag order by max_score desc,min_score desc,uid desc) as ranking f...
2023-02-22
0
358
题解 | #每个6/7级用户活跃情况#
select uid, count(distinct uid,date_format(tm,"%Y%m")) as act_month_total, count(distinct case when year(tm)= 2021 then uid + date_format(tm,"%Y%m%d")...
2023-02-21
0
233
题解 | #统计作答次数#
select count(*),count(submit_time) as complete_pv, count(distinct exam_id,case when submit_time is not null then 1 else null end) as complete_exam_cnt...
2023-02-20
0
229
题解 | #SQL类别高难度试卷得分的截断平均值#
select tag,difficulty,round(avg(score),1) from ( select uid,exam_record.exam_id,score,tag,difficulty, percent_rank() over(partition by exam_id...
2023-02-03
0
237
题解 | #第二快/慢用时之差大于试卷时长一半的试卷#
select answ.exam_id,duration,release_time from (select ans.exam_id,max(ans_time) - min(ans_time) as ans_time_diff from &nbs...
2022-08-18
0
260