09 MySQL--操作真题

1.

用一条 SQL 语句,查询出每门课程都大于 80 分的人。

分析:

  1. 去重查询出存在课程小于 80 分的人,设为集合A
  2. 查询不在集合 A 中的人
sql 复制代码
# 第一步:找小于等于80分的学员姓名
select distinct name from t_student where fenshu <= 80

​# 第二步:not in
select distinct name from t_student where name not in(select distinct name from t_student where fenshu <= 80)

2

相关推荐
handler014 小时前
【MySQL】常用命令总结(库与表增删查改)
运维·数据库·mysql·命令·总结
week@eight4 小时前
Linux - Doris
linux·运维·数据库·mysql
苏渡苇6 小时前
Spring Cloud Alibaba:将 Sentinel 熔断限流规则持久化到 Nacos 配置中心
数据库·spring boot·mysql·spring cloud·nacos·sentinel·持久化
杨云龙UP6 小时前
Oracle Recycle Bin 回收站详解:DROP TABLE 后还能找回吗?
linux·运维·数据库·sql·mysql·oracle
Fanta丶8 小时前
7.MySql函数使用 字符串、数值、日期、流程函数
mysql
代码中介商9 小时前
MySQL 存储过程与触发器完全指南
数据库·mysql
Yupureki9 小时前
《MySQL数据库基础》9.索引原理
linux·运维·服务器·网络·数据库·mysql
李少兄10 小时前
MySQL分页重复问题深度剖析
android·数据库·mysql
Yupureki10 小时前
《MySQL数据库基础》8.复合查询
linux·运维·服务器·网络·数据库·mysql
AI人工智能+电脑小能手12 小时前
【大白话说Java面试题 第78题】【Mysql篇】第8题:解释下最左前缀原则?
java·开发语言·数据库·mysql·面试