当前位置:网站首页>[Sql brush topic] Query information data--Day1
[Sql brush topic] Query information data--Day1
2022-08-04 19:04:00 【stair jumping penguin】
目录
Inquire about the students of the specified school
Find students of a specified age
Query students of a specified age group
Search for students at a given university
前言
数据库技术是通过研究数据库的结构、存储、设计、管理以及应用的基本理论和实现方法,并利用这些理论来实现对数据库中的数据进行处理、分析和理解的技术.即:数据库技术是研究、管理和应用数据库的一门软件科学.其中mysqlIt is a very hot database.
Query information data
Inquire about the students of the specified school
思路:We already know the information about the database,可以看到是存在5confidence,And there is little repetition of the same information.Then we can think,If we can try to specify the table name,Then specify the table name学校信息查询,然后输入指定的id这样就可以了,Then let's experiment.
题目描述:
代码:
SELECT device_id,university
FROM user_profile
WHERE university="北京大学"
结果
Find students of a specified age
思路:We already know the information about the database,可以看到是存在5confidence,And there is little repetition of the same information.Then we can think,If we can try to specify the table name,Then specify the table name年龄信息查询,然后输入指定的id这样就可以了,Then let's experiment.
题目描述:
代码:
SELECT device_id,gender,age,university
FROM user_profile
WHERE age>24;
结果:
Query students of a specified age group
思路:We already know the information about the database,可以看到是存在5confidence,And there is little repetition of the same information.Then we can think,If we can try to specify the table name,Then specify the table name年龄范围查询,然后输入指定的id这样就可以了,Then let's experiment.
题目描述:
代码:
SELECT device_id,gender,age from user_profile where age between 20 and 23
结果:
Search for students at a given university
思路:We already know the information about the database,可以看到是存在5confidence,And there is little repetition of the same information.Then we can think,If we can try to specify the table name,Then specify the table nameRemove school enquiries,然后输入指定的id这样就可以了,Then let's experiment.
题目描述:
代码:
select device_id,gender,age,university
from user_profile
where university != '复旦大学'
结果:
小结
Brushing questions is very helpful for us to familiarize ourselves with and consolidate the content of knowledge points.
点击右边链接 刷题链接
边栏推荐
猜你喜欢
随机推荐
The upgrade of capacity helps the flow of computing power, the acceleration moment of China's digital economy
视频目标检测
如何让 JS 代码不可断点
MMDetection 使用示例:从入门到出门
How can test engineers break through career bottlenecks?
老电脑怎么重装系统win10
MySQL安装教程(详细)
我的四周年创作纪念日
Kubernetes入门到精通- Operator 模式入门
limux入门3—磁盘与分区管理
ELECTRA:Pre-training Text Encoders as Discriminators Rather Than Generators
ros2订阅esp32发布的电池电压数据-补充
【web自动化测试】Playwright快速入门,5分钟上手
如何进行自动化测试?
BigDecimal 使用注意!!“别踩坑”
元国度链游系统开发
基于3D机器视觉的采血试管分拣系统
Day018 继承
Usage of collect_list in Scala105-Spark.sql
译文推荐|Apache Pulsar 隔离系列(四):单集群隔离策略