2025-01 小猿搜题 入门

找出2024-06-30这次考试,历史、政治、地理任意一门学科成绩大于等于90分的记录。

输出所有字段,排序规则如下:order by score desc ,student_id,subject。

经典-学生表课程表 between and or and >=

students,学生表

student_id name class_code grade_code birth_date residence gender
100611 姜建华 C219 S3 2009-01-15 城镇 m
102890 韩辉 C223 S3 2009-10-26 农村 m
105684 李丽丽 C219 S3 2009-03-28 城镇 m
110591 李华 C223 S1 2008-05-31 农村 m
110611 王桂珍 C218 S3 2008-06-04 城镇 m

scores,成绩表

分数可能为Null

student_id subject score exam_date
358575 生物 29 2024-06-30
735011 语文 37 2024-03-30
597305 历史 67 2024-03-30
921856 数学 76 2024-04-27
455713 化学 77 2024-06-30

teachers,教师表

如第一行,赵娇娇教学C218、C219、C217三个班级的语文,是C217班的班主任

teacher_id name subject class_code head_teacher degree graduate_date(毕业日期) enter_date(入校日期) gender qualification(职称) fir_degr(第一学历) mst_degr(研究生学历)
t001 赵娇娇 语文 C218C219C217 C217 master 2010-06-30 2010-07-30 f Senior 北京大学 北京大学
t002 任伊乐 语文 C220C221C222C223C224 C220 master 2010-06-30 2010-07-30 f Senior 北京大学 清华大学
t003 李敏 数学 C218C219C217 C218 master 1994-06-30 1994-07-30 f Senior 北京大学 复旦大学
t004 吕敏 数学 C220C221C222 C221 phd 1995-06-30 1995-07-30 f Senior 北京大学 清华大学
t005 陈佳蔬 数学 C223C224 C223 master 2010-06-30 2010-07-30 f null 北京大学 北京大学

university,大学信息表 

name is_985 times_rnk(泰晤士2024全球排名)
King's College London 0 34
National University of Singapore,NUS 0 24
Singapore Polytechnic 0 null
上海交通大学 1 113
北京大学 1 16

输出结果仅为示例,实际不止6行。

student_id subject score exam_date
190638 地理 100 2024-06-30
251774 地理 100 2024-06-30
251774 政治 100 2024-06-30
358575 政治 100 2024-06-30
493835 地理 100 2024-06-30
624634 地理 98 2024-06-30

ID213 渣男腰子可真行,端午中秋干不停
入门 between and date or and 时间日期 入门-闺蜜捉奸记 思扣SQLintern
ID278 性别已知的听歌用户
草履虫 or and >= <= Week2打卡 QQ音乐
ID284 A和K之间的手牌(2)
草履虫 between and or Week3打卡 澳门旅游娱乐
ID349 不经过第二象限的所有函数
草履虫 or and >= <= = Week9打卡 初中数学常识 作业帮
ID350 经过第二象限的所有函数
草履虫 or and != > < = Week11打卡 初中数学常识 作业帮

 点击下方空白区域即可查看参考答案

MySQL 8.0

00:00