会编程的发呆爱好者加麻加辣
会编程的发呆爱好者加麻加辣
全部文章
分类
归档
标签
去牛客网
登录
/
注册
会编程的发呆爱好者加麻加辣的博客
全部文章
(共208篇)
题解 | 考试分数(五)
with p as ( select id,job,score,row_number() over(partition by job order by score desc) as t_rank, count(*) over (partition by job) as total ...
2025-03-25
0
35
题解 | 考试分数(四)
with d as ( select id,job,score, dense_rank () over(partition by job order by score) rk, count(*) over(partition by job) total from grade ) s...
2025-03-23
0
31
题解 | 考试分数(三)
select a.id,a.name,a.score from( select g.id,l.name,g.score, dense_rank() over (partition by g.language_id order by g.score desc) as ranking from gra...
2025-03-23
0
25
题解 | 考试分数(二)
select id,job,score from (select *, avg(score) over (partition by job ) as avg from grade )as a where score>avg order by id 取出高于平均分的人的信息,使用窗口函数
2025-03-23
0
25
题解 | 考试分数(一)
select job, round(avg(score),3) as avg from grade group by job order by avg desc easy 水一天 哈哈
2025-03-22
0
30
题解 | 牛客每个人最近的登录日期(六)
select distinct u.name as u_n, p.date, sum(p.number) over (partition by u.name order by p.date ) as ps_num from passing_number p join user u on u.i...
2025-03-21
0
30
题解 | 牛客每个人最近的登录日期(五)
select t.date, ifnull(round(count(distinct b.user_id)/count(distinct a.user_id),3),0) as p from (select date from login group by date)t left join ...
2025-03-21
0
24
题解 | 牛客每个人最近的登录日期(四)
select a.date,count(case when a.ranking =1 then 1 else null end) from (select date, row_number() over(partition by user_id order by date) as ranking...
2025-03-20
0
21
题解 | 牛客每个人最近的登录日期(三)
select round(count(distinct b.user_id)/ count(distinct a.user_id) ,3) as p from (select user_id,min(date) first_date from login group by user_id)a l...
2025-03-20
0
23
题解 | 牛客每个人最近的登录日期(二)
select u.name as u_n, c.name as c_n,a.date as date from (select *,row_number() over (partition by user_id order by date desc) as ranking from login)a...
2025-03-20
0
32
首页
上一页
12
13
14
15
16
17
18
19
20
21
下一页
末页