排名

用户解题统计

过去一年提交了

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

收藏

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

评论笔记

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

提交记录

提交日期 题目名称 提交代码
2025-05-25 HAVING-语数英优异的学生 
select student_id, sum(score) as sum_score 
from scores
where exam_date = '2024-06-30'
and subject in ('语文','数学','英语')
group by student_id
having sum(score) > 330;
2025-05-25 HAVING-语数英优异的学生 
select student_id, sum(score) as sum_score 
from scores
where exam_date = '2024-06-30'
and subject in ('语文','数学','英语')
group by student_id
having sum(score) >= 330;
2025-05-25 HAVING-执教教师超过3人的科目 
select subject
from teachers
group by subject
having count(teacher_id) >= 3;
2025-05-25 HAVING-执教教师超过3人的科目 
select subject, count(teacher_id)
from teachers
group by subject
having count(teacher_id) >= 3;
2025-05-25 HAVING-每次成绩都不低于80分的学生 
select student_id, max(score), min(score),avg(score)
from scores
group by student_id
having min(score) >= 80
;
2025-05-25 CASE WHEN-老中青教师数量 
select 
case when enter_date >= '2010-01-01' then '青年教师'
 when enter_date < '2000-01-01' then '资深教师'
 else '中年教师'
 end as teacher_type,
count(*)
from teachers
group by teacher_type;
2025-05-25 CASE WHEN-男女学生的数量 
select 
case s.gender 
when 'm' then '男'
when 'f' then '女'
end as gender_text,
count(*)
from students s
group by gender_text;
2025-05-20 聚合函数-比较两位同学的数学成绩 
select student_id, max(score), min(score), avg(score)
from scores
where (student_id = 460093or student_id = 735011) and subject = '数学'
group by student_id;
2025-05-20 聚合函数-比较两位同学的数学成绩 
select student_id, max(score), min(score), avg(score)
from scores
where student_id = 460093or student_id = 735011
group by student_id;
2025-05-20 聚合函数-735011学生的语文成绩 
select max(score), min(score), avg(score)
from scores
where subject = '语文' and student_id = '735011'
group by student_id;
2025-05-20 聚合函数-735011学生的语文成绩 
select student_id, max(score), min(score), avg(score)
from scores
where subject = '语文' and student_id = '735011'
group by student_id;
2025-05-20 GROUP BY-年龄最大学生的出生日期 
select class_code, min(birth_date) 
from students 
group by class_code
order by class_code
;
2025-05-20 GROUP BY-年龄最大学生的出生日期 
select class_code, min(birth_date) 
from students 
group by class_code
order by class_code
limit 5;
2025-05-20 GROUP BY-各科目最高分、最低分 
select subject, max(score) as max_score, min(score) as min_score 
from scores 
group by subject
order by subject;
2025-05-20 GROUP BY-各科目平均分 
select subject, avg(score) as average_score 
from scores 
where exam_date = '2024-06-30'
group by subject
order by subject;
2025-05-20 GROUP BY-各科目平均分 
select subject, avg(score) as average_score 
from scores 
where exam_date = '2024-06-30'
group by subject
order by subject
limit 5;
2025-05-20 GROUP BY-各班级人数 
select class_code, count(*) 
from students 
group by class_code
;
2025-05-20 条件过滤-查找1994年至1997年毕业的女教师 
select name, subject, class_code, graduate_date 
from teachers 
where graduate_date >='1994-01-01' and graduate_date <='1997-12-31'
	and gender = 'f'
order by graduate_date;
2025-05-20 条件过滤-符合条件的班主任 
select name, subject, class_code, qualification 
from teachers 
where (fir_degr = '北京大学' or fir_degr = '清华大学')
and head_teacher is not null
order by name
;
2025-05-20 条件过滤-符合条件的班主任 
select name, subject, class_code, qualification 
from teachers 
where fir_degr = '北京大学' or fir_degr = '清华大学'
and head_teacher is not null
order by name
;