排名

用户解题统计

过去一年提交了

勋章 ①金银铜:在竞赛中获得第一二三名;②好习惯:自然月10天提交;③里程碑:解决1/2/5/10/20/50/100/200题;④每周打卡挑战:完成每周5题,每年1月1日清零。

收藏

收藏日期 题目名称 解决状态
没有收藏的题目。

评论笔记

评论日期 题目名称 评论内容 站长评论
没有评论过的题目。

提交记录

提交日期 题目名称 提交代码
2026-03-17 S1年级物理成绩前10名(2) 
with 物理前十 as 
(
select s.student_id, 
 s.name, 
 sc.score, 
 rank() over (order by sc.score desc)as ranking
from students s 
join scores sc 
on s.student_id=sc.student_id
where s.grade_code = 'S1'and sc.subject = '物理'
)
select student_id, name, score, ranking from 物理前十
limit 10
2026-03-17 S1年级物理成绩前10名(2) 
with 物理前十 as 
(
select s.student_id, 
 s.name, 
 sc.score, 
 rank() over (order by sc.score desc)as ranking
from students s 
join scores sc 
on s.student_id=sc.student_id
where s.grade_code = 'S1'and sc.subject = '物理'
)
select student_id, name, score, ranking from 物理前十
2026-03-17 S1年级物理成绩前10名(2) 
with 物理前十 as 
(
select s.student_id, 
 s.name, 
 sc.score, 
 rank() over (order by sc.score desc)as 排名
from students s 
join scores sc 
on s.student_id=sc.student_id
where s.grade_code = 'S1'and sc.subject = '物理'
)
select student_id, name, score, 排名 from 物理前十
2026-03-17 S1年级物理成绩前10名(2) 
with 物理前十 as 
(
select s.student_id, 
 s.name, 
 sc.score, 
 rank() over (order by sc.score desc)as 排名
from students s join scores sc on s.student_id=sc.student_id
where s.grade_code='S1'and sc.subject='物理'
)
select student_id, name, score, 排名 from 物理前十
2026-03-17 S1年级物理成绩前10名(2) 
with 物理前十 as 
(
select s.student_id, s.name, sc.score, rank() over (order by sc.score)as 排名
from students s join scores sc on s.student_id=sc.student_id
where s.grade_code='S1'and sc.subject='物理'
)
select student_id, name, score, 排名 from 物理前十
2026-03-13 S1年级物理成绩前10名(2) 
with 物理前十 as 
(
select
s.student_id,
s.name,
sc.score,
rank() over(order by sc.score desc) as 排名
from students s join scores sc on s.student_id=sc.student_id
where s.grade_code='s1' and sc.subject='物理'
)
 select student_id,
name,
score,
排名
 from 物理前十
 limit 10
2026-03-13 S1年级物理成绩前10名(2) 
with 物理前十 as 
(
select
s.student_id,
s.name,
sc.score,
rank() over(order by sc.score desc) as 排名
from students s join scores sc on s.student_id=sc.student_id
where s.grade_code='s1' and sc.subject='物理'
)
 select student_id,
name,
score,
排名
 from 物理前十
2026-03-13 S1年级物理成绩前10名(2) 
with 物理前十 as 
(
select
s.student_id,
s.name,
sc.score,
rank() over(order by sc.score desc) as 排名
from students s join scores sc on s.student_id=sc.student_id
where s.grade_code='s1' and sc.subject='物理'
)
 select student_id,
name,
score,
排名
 from 物理前十
 limit 10;
2026-03-13 S1年级物理成绩前10名(1) 
WITH 物理前十 AS ( 
SELECT 
s.student_id,s.name,sc.score,
row_number() 
over(partition by s.grade_code ORDER BY sc.score DESC) AS 排名 
FROM 
students s
JOIN 
scores sc ON s.student_id = sc.student_id
WHERE 
s.grade_code = 'S1' 
AND sc.subject = '物理'
)
SELECT 
student_id, 
name, 
score, 
排名
FROM 
物理前十
limit 10;
2026-03-13 人数最多的学生姓氏 
select left (name,1) AS aname,
 count(*) AS cnt
 from students
 group by left (name,1)
 order by cnt desc
 limit 5;
2026-03-13 学生信息和班主任姓名 
select s.name,s.class_code,s.grade_code,t.name AS head_teacher_name
from students s join teachers t ON s.class_code=t.head_teacher
order by student_id;
2026-03-13 学生信息和班主任姓名 
select s.name, s.class_code, s.grade_code, t.name AS head_teacher_name
from students s JOIN teachers t on s.class_code = t.head_teacher
order by s.student_id;
2026-03-13 学生信息和班主任姓名 
select s.name,s.class_code,s.grade_code,t.name AS head_teacher_name
from students s JOIN teachers t on s.class_code = t.class_code
order by s.student_id;