coding的佩奇酱
coding的佩奇酱
全部文章
分类
归档
标签
去牛客网
登录
/
注册
coding的佩奇酱的博客
全部文章
(共25篇)
题解 | #获得积分最多的人(三)#
select id,name,grade_num from (select id,name,grade_num, dense_rank() over(order by grade_num desc) dk from (select id,name,sum(gnum) as grade_num fr...
2023-08-17
0
230
题解 | #商品交易(网易校招笔试真题)#
select t2.goods_id, t1.name, t1.weight, sum(t2.count) from goods t1 join trans t2 on t1.id = t2.goods_id group by t2.goods_id,t1.name,t1.weight havi...
2023-08-17
0
380
题解 | #牛客每个人最近的登录日期(二)#
select u_n,c_n,date from (select u1.name u_n, c1.name c_n, l1.date date, dense_rank() over(partition by u1.name order by l1.date desc) as dk from lo...
2023-08-07
0
382
题解 | #考试分数(五)#
select t3.id, t3.job, t3.score, t3.rn from (select *, row_number() over(partition by job order by score desc) as rn from grade) t3 join (select j...
2023-08-06
0
365
题解 | #考试分数(四)#
with temp as (select job, count(*) as num from grade group by job) select job, round(case when num%2 = 1 then (num+1) / 2 when num%2 = 0 then num/2 ...
2023-08-06
0
312
题解 | #异常的邮件概率#
select date, round(sum(if(e1.type = "no_completed",1,0)) / count(e1.type),3) from email e1 left join user b1 on e1.send_id = b1.id left j...
2023-08-03
0
278
题解 | #统计牛客网数据#
str1= input() list1 = str1.split(" ") list2 = [] for num in list1: list2.append(int(num)) print(max(list2)) print(min(list2)) s=0 for i ...
2023-08-01
0
261
题解 | #统计人次#
men = input() list1 = men.split(" ") num = 0 for i in range(0,len(list1)): if list1[i] == "NiuNiu": num+=1 print(num)...
2023-07-31
0
261
题解 | 给出employees表中排名为奇数行
select t1.first_name from (select first_name, row_number() over(order by first_name) as rn from employees) t1 join employees e1 on e1.first_name = t1...
2023-07-28
0
213
题解 | #改变单词游戏#
import re s1 = input() s2 = input() list1 = re.split("\s+",s1) list3 = list1[:-1] y = list3.append(str(s2)) print(list1) print(list1[:-1]) p...
2023-07-26
0
333
首页
上一页
1
2
3
下一页
末页