当前位置:网站首页>[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.
点击右边链接 刷题链接
边栏推荐
猜你喜欢
随机推荐
天呐,七夕我收到9份告白~
当项目中自动格式化插件Prettier和ESLint冲突报错时如何解决
win10 uwp win2d 使用 Path 绘制界面
目标检测的发展与现状
PHP代码审计9—代码执行漏洞
如何进行自动化测试?【Eolink分享】
Scala104 - Built-in datetime functions for Spark.sql
openharmony初体验(1)
量化交易机器人系统开发
GBase8s存储过程
Google AppSheet: 无需编程构建零代码应用
【简答题】月薪4k和月薪8k的区别就在这里
将网页变成字符串,并保存起来
直播回顾|7 月 Pulsar 中文开发者与用户组会议
LVS+Keepalived群集
MySQL安装教程(详细)
当前最快的实例分割模型:YOLACT 和 YOLACT++
HCIP-R&S By Wakin自用笔记(1)企业网络高级解决方案
如何给MySQL添加自定义语法 ?
CPU突然飙高系统反应慢,是怎么导致的?有什么办法排查?









