当前位置:网站首页>[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.
点击右边链接 刷题链接
边栏推荐
猜你喜欢
随机推荐
ros2订阅esp32发布的电池电压数据-补充
”元宇宙“必须具备这些特点
迪赛智慧数——其他图表(主题河流图):近年居民消费、储蓄、投资意愿
开篇-开启全新的.NET现代应用开发体验
译文推荐|Apache Pulsar 隔离系列(四):单集群隔离策略
从零开始实现一个简单的CycleGAN项目
如何给MySQL添加自定义语法 ?
我的四周年创作纪念日
在表格数据集上训练变分自编码器 (VAE)示例
入选爱分析·银行数字化厂商全景报告,网易数帆助力金融数字化场景落地
运力升级助力算力流转,中国数字经济的加速时刻
机器学习——线性回归
curl命令的那些事
ros2订阅esp32发布的电池电压数据
HCIA-R&S自用笔记(22)STP状态与计时器、STP拓扑变化、STP配置及实验
win10 uwp xaml 绑定接口
T+Cloud:构建新型生意社交网络和营销关系的“智公司”
污损指纹恢复与识别
阿里云技术专家秦隆:云上如何进行混沌工程?
Internship: changed the requirements









