当前位置:网站首页>MySQL 9th job - connection Query & sub query
MySQL 9th job - connection Query & sub query
2022-06-26 10:28:00 【m0_ sixty-one million nine hundred and sixty-one thousand eight】
- Inquire about “Chisel” Workshop number of the workshop 、 Name of workshop director 、 Contact information of the director
- select no,name,phone from lingjinzheng_workshop where no in(select
shop_no from zhongzheng_worker where name=“Chisel”);
Query the names of all employees 、 Employee contact number 、 Workshop address 、 Name of workshop director 、 Contact information of the director
select z.name,z.phone,x.address,x.name,x.phone from lingjinzheng_worker
z right join lingjinzheng_workshop x on z.shop_no=x.no;
Inquire about “Chisel” Names of all employees in the workshop 、 Employee contact number 、 Workshop address
select z.name,z.phone,x.address from lngjinzheng_worker z inner join
lingjinzheng_workshop x on z.shop_no=x.no where z.shop_no=“WS1”;
Query the product number of products with qualified quality 、 Employee name 、 Employee contact number
select z.no,x.name,x.phone from lingjinzheng_product z inner join
lingjinzheng_worker x on z.work_no=x.no where is_qualified=“1”
- Query the workshop number of the workshop where the products have been produced 、 Average length of service
select shop_no ,avg(seniority) from lingjinzheng_worker where
shop_no=“WS2”;

Check the product number of all products 、 Qualified or not ( Qualified return true Unqualified return false)、 Employee number 、 Employee name 、 Employee contact information 、 Workshop number 、 Workshop address
select z.no,z.is_qualified,a.no,a.name,a.phone,b.no,b.address from
linjinzheng_product z inner join lingjinzheng_worker a on z.work_no=a.no
inner join lingjinzheng_workshop b on a.shop_no=b.no;
- Query whether there exists in the employee table “common” Employees of the type of work , If it exists, query the employee table “common” All field information of employees of the type of work
select * from lingjinzheng_worker where work_type=“common”;

Query the workshop number of resigned employees 、 Workshop director 、 Contact information of the director
select no,name,phone from lingjinzheng_workshop where no in(select
shop_no from lingjinzheng_worker where is_onwork=“0”);

边栏推荐
- Extracting public fragments from thymeleaf
- 2. 合并两个有序数组
- Global and Chinese market of aluminum sunshade systems 2022-2028: Research Report on technology, participants, trends, market size and share
- 动态库连接 - 符号冲突 - 全局符号介入
- About multi table query of MySQL
- P1296 whispers of cows (quick row + binary search)
- How do technicians send notifications?
- 【LeetCode】59. 螺旋矩阵 II
- 首批12家企业入驻!广州首个集中展销老字号产品专柜开张
- 【Leetcode】76. Minimum covering substring
猜你喜欢

The IE mode tab of Microsoft edge browser is stuck, which has been fixed by rolling back the update

Basic string operations in C

MySQL第六次作业-查询数据-多条件

MySQL第十二次作业-存储过程的应用

904. 水果成篮

Servlet learning notes II

MySQL 13th job - transaction management

Win10安装tensorflow-quantum过程详解

Flutter与原生通信(上)

The fourteenth MySQL operation - e-mall project
随机推荐
Reshape a two-dimensional array with 3 rows and 3 columns to find the sum of the diagonals
Jar version conflict resolution
【Leetcode】76. 最小覆盖子串
The fourteenth MySQL operation - e-mall project
1. 两数之和(LeetCode题目)
echo $?
【LeetCode】59. Spiral matrix II
Under the double reduction, the amount of online education has plummeted. Share 12 interesting uses of webrtc
Retrofit common request methods and comments, post, get heard file upload
Dialog centered
Express (I) - easy to get started
What is in the method area - class file, class file constant pool, runtime constant pool
基础-MySQL
Servlet learning notes II
Internationalization configuration
Global and Chinese market of aluminum sunshade systems 2022-2028: Research Report on technology, participants, trends, market size and share
看我在Map<String, String>集合中,存入Integer类型数据
MySQL第十二次作业-存储过程的应用
About multi table query of MySQL
全渠道、多场景、跨平台,App如何借助数据分析渠道流量