潘婷婷-123
潘婷婷-123
全部文章
分类
归档
标签
去牛客网
登录
/
注册
潘婷婷-123的博客
全部文章
(共12篇)
题解 | #生成列表#
namelist=input() print(list(namelist.split()))
2023-02-23
0
188
题解 | #发送offer#
offer_list=['Allen','Tom','Andy'] for i in offer_list: if (i=='Andy'): break print(f'{i}, you have passed our interview and will soon ...
2023-02-22
0
233
题解 | #格式化输出(二)#
#"\n"自动换行 a=input() print(a.lower()+"\n"+a.upper()+"\n"+a.title()+"\n")
2023-02-22
0
263
题解 | #浙大不同难度题目的正确率#
正确率=正确数量/总答题数,case when 进行条件判断是否正确 select c.difficult_level, sum( case b.result when 'right' then 1 else 0 end)/count(a.device_id) as correct_rate fro...
2023-02-22
0
270
题解 | #统计复旦用户8月练题情况#
判断条件,学校是复旦大学。统计8月和非8月的答题量和正确率,分别对月份和是否正确进行条件判断函数,8月计1,非8月计0,相加。正确计1,非正确计0,相加。按照device_id进行分组统计。 select a.device_id,a.university,sum(case month(date) w...
2023-02-22
0
218
题解 | #截取出年龄#
select age,count(age) as number from (select substring(profile,12,2) as age from user_submit) as a group by age;
2023-02-22
0
212
题解 | #提取博客URL中的用户名#
select device_id,substring_index(blog_url,'/',-1) as user_name from user_submit;
2023-02-22
1
250
题解 | #统计每个用户的平均刷题数#
-- 平均刷题数=总刷题数/总人数,按照题目难度进行分组统计,设定条件为山东大学 select a.university, c.difficult_level, count(b.question_id)/count(distinct a.device_id) as avg_answer_cnt fr...
2023-02-21
1
269
题解 | #计算用户8月每天的练题数量#
select day,count(question_id) as question_cnt from -- 创建子查询 ( select *, month(date) as month, day(date) as day from question_practice_detail ) a...
2023-02-15
5
668
题解 | #查看不同年龄段的用户明细#
select device_id,gender,age_cut from( select *, case when age<20 then '20岁以下' when age between 20 and 24 then'20-24岁' when age>=25 then'25岁及以上' ...
2023-02-15
5
758
首页
上一页
1
2
下一页
末页