GuaMiao
GuaMiao
全部文章
分类
归档
标签
去牛客网
登录
/
注册
GuaMiao的博客
全部文章
(共89篇)
题解 | #筛选昵称规则和试卷规则的作答记录#
with t1 as ( select uid from user_info where nick_name REGEXP '^牛客[0-9]*号$' or nick_name REGEXP '^[0-9]+$' ), t2 as ( select exam_...
2023-08-11
0
389
题解 | #统计有未完成状态的试卷的未完成数和未完成率#
select exam_id, sum(score is null) as incomplete_cnt, round(sum(score is null)/count(*), 3) as incomplete_rate from exam_record group by exam_id hav...
2023-08-11
1
296
题解 | #试卷发布当天作答人数和平均分#with as
with t1 as ( select a.uid, a.exam_id, a.score, b.tag from exam_record as a left join examination_info as b on a.exam_id = b.exam_id ),...
2023-08-10
0
318
题解 | #每个题目和每份试卷被作答的人数和次数#
with t1 as ( select exam_id as tid, count(distinct uid) as uv, count(uid) as pv from exam_record group by tid order by uv desc, pv des...
2023-08-04
0
309
题解 | #作答试卷得分大于过80的人的用户等级分布#
with t as ( select uid, a.exam_id, b.tag, score from exam_record as a left join examination_info as b on a.exam_id = b.exam_id ) sele...
2023-08-04
0
288
题解 | #统计作答次数#
select count(start_time) as total_pv, count(score) as complete_pv, count(distinct case when score is null then null else exam_id end) as complete_exam...
2023-08-03
0
372
题解 | #寻找峰值#Python
# # 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 # # # @param nums int整型一维数组 # @return int整型 # class Solution: def findPeakElement(self , nums: List[int...
2023-08-03
0
308
题解 |最大连续回答问题天数大于等于3天的用户及其对应等级
# 以author_id分组,将回答天数>=3天的删选出来,之后再看是否连续(将日期放到一个字符串中?) select a.author_id, author_level, answer_days from ( select count(distinct answer_date) as...
2023-08-03
0
285
题解 |某乎回答过教育类问题的用户有多少用户回答过职场类问题
select count(distinct author_id) as num from ( select a.author_id, a.issue_id, b.issue_type from answer_tb as a left join issue_tb as b ...
2023-08-03
0
374
题解 | #某乎问答单日回答问题数大于等于3个的所有用户#
select answer_date, author_id, count(issue_id) as answer_count from answer_tb group by answer_date, author_id having answer_count >= 3 order by ans...
2023-08-03
0
239
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页