当前位置:网站首页>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”);

边栏推荐
- Download MySQL database installation package website of each system and version
- Constraintlayout control uses full Raiders
- Function run time
- Based on Zeng Shen's explanation, the line segment tree is studied again one
- Problems encountered in the application and development of Hongmeng and some roast
- 【无标题】
- A list of common methods for customizing paint and canvas of view
- Global and Chinese market of amateur football helmets 2022-2028: Research Report on technology, participants, trends, market size and share
- Blog article index summary -- Software Engineering
- MySQL第十四次作业--电子商城项目
猜你喜欢

Hcia-dhcp experiment

【LeetCode】59. 螺旋矩阵 II

How to start the learning journey of webrtc native cross platform development?

MySQL第十一作業-視圖的應用

The first batch of 12 enterprises settled in! Opening of the first time-honored product counter in Guangzhou

SSH, SCP command appears permission denied, please try again solution

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

方法区里面有什么——class文件、class文件常量池、运行时常量池

P1296 whispers of cows (quick row + binary search)

What is in the method area - class file, class file constant pool, runtime constant pool
随机推荐
二叉树常见面试题
JVM垃圾回收什么情况会进入老年代
【Leetcode】76. 最小覆盖子串
Detailed explanation of winsorflow quantum installation process
Openxcap usage
Servlet learning notes II
P1296 whispers of cows (quick row + binary search)
Global and Chinese market for change and configuration management software 2022-2028: Research Report on technology, participants, trends, market size and share
Call API interface to generate QR code of wechat applet with different colors
[untitled]
Win10安装tensorflow-quantum过程详解
MySQL项目8总结
【LeetCode】59. 螺旋矩阵 II
Allocation of heap memory when creating objects
Global and Chinese market of recycled paper 2022-2028: Research Report on technology, participants, trends, market size and share
C中字符串基本操作
MySQL 11th job - view application
leetCode-链表的中间结点
How to change the QR code material color of wechat applet
【Leetcode】76. Minimum covering substring