Question: Submit a single SQL query statement for each of the following questions: 1. Display the SMemberID and SMemberName of staff members cleaning apartments rented by


Submit a single SQL query statement for each of the following questions:
1. Display the SMemberID and SMemberName of staff members cleaning apartments rented by corporate clients whose corporate location is Chicago. Do not display the same information more than once.
2. Display the CCName of the client and the CCName of the client who referred him or her, for every client referred by a client in the Music industry.
In this sequence of DROP TABLE statements, no table is dropped before a table with a foreign key referring to it is dropped. If we execute this sequence of DROP TABLE statements, every table in the ZAGI Retail Company Sales Department Database will be dropped. In that case, the ZAGI Retail Company Sales Department can be re-created by executing again all the statements listed in Figure 5.16. REGION RegionID Region Name Chicagoland T Tristate INCLUDES ProductID 1X1 Quantity TID T111 VENDOR VendorID PG 1 Vendor Name Pacifica Gear Mountain King 2X2 1 MK T222 T333 3X3 5 1X1 T333 1 1 STORE StoreID S1 4X4 1 RegionID T444 T444 CATEGORY CategoryID CategoryName CP Camping FW Footwear Store Zip 60600 60605 35400 2X2 2 S2 4X4 4 S3 T 5X5 T555 T555 T555 2 6X6 1 StoreID TDate SALESTRANSACTION TID CustomerID T111 1-2-333 T222 2-3-444 S1 S2 . Not CUSTOMER Customer ID 1-2-333 2-3-444 Customer Name CustomerZip Tina 60137 Tony 60611 Pam 35401 T333 T444 1-2-333 1-Jan-2020 1-Jan-2020 2-Jan-2020 2-Jan-2020 2-Jan-2020 S3 S3 3-4-555 3-4-555 2-3-444 T555 S3 PRODUCT ProductID 1X1 Product Price $100 VendorID CategoryID PG CP Product Name Zzz Bag Easy Boot Cosy Sock 2X2 MK $70 $15 FW FW 3X3 MK 4X4 PG FW Dura Boot Tiny Tent Biggy Tent $90 $150 MK 5X5 6X6 CP $250 MK CP U RegionID Region Name Product Price ProductID ProductName VendorID Vendor Name REGION PRODUCT Supplied By TH VENDOR Located In CategoryID CategoryName Quantity Belongs To Includes CATEGORY STORE H Occursat Storeld CustomerID (CustomerName Store Zip SALES TRANSACTION Involves CUSTOMER TID TDate Customer Zip PRODUCT ProductID Product Price ProductName VendorID (FK) CategoryID (FK) VENDOR VendorID Vendor Name REGION RegionID RegionName CATEGORY CategoryID CategoryName STORE StoreID Store Zip RegionID (FK) INCLUDES ProductID (FK) TID (FK) Quantity SALESTRANSACTION TID TDate StoreID (FK) CustomerID CK) CUSTOMER Customer ID Customer Name CustomerZip In this sequence of DROP TABLE statements, no table is dropped before a table with a foreign key referring to it is dropped. If we execute this sequence of DROP TABLE statements, every table in the ZAGI Retail Company Sales Department Database will be dropped. In that case, the ZAGI Retail Company Sales Department can be re-created by executing again all the statements listed in Figure 5.16. REGION RegionID Region Name Chicagoland T Tristate INCLUDES ProductID 1X1 Quantity TID T111 VENDOR VendorID PG 1 Vendor Name Pacifica Gear Mountain King 2X2 1 MK T222 T333 3X3 5 1X1 T333 1 1 STORE StoreID S1 4X4 1 RegionID T444 T444 CATEGORY CategoryID CategoryName CP Camping FW Footwear Store Zip 60600 60605 35400 2X2 2 S2 4X4 4 S3 T 5X5 T555 T555 T555 2 6X6 1 StoreID TDate SALESTRANSACTION TID CustomerID T111 1-2-333 T222 2-3-444 S1 S2 . Not CUSTOMER Customer ID 1-2-333 2-3-444 Customer Name CustomerZip Tina 60137 Tony 60611 Pam 35401 T333 T444 1-2-333 1-Jan-2020 1-Jan-2020 2-Jan-2020 2-Jan-2020 2-Jan-2020 S3 S3 3-4-555 3-4-555 2-3-444 T555 S3 PRODUCT ProductID 1X1 Product Price $100 VendorID CategoryID PG CP Product Name Zzz Bag Easy Boot Cosy Sock 2X2 MK $70 $15 FW FW 3X3 MK 4X4 PG FW Dura Boot Tiny Tent Biggy Tent $90 $150 MK 5X5 6X6 CP $250 MK CP U RegionID Region Name Product Price ProductID ProductName VendorID Vendor Name REGION PRODUCT Supplied By TH VENDOR Located In CategoryID CategoryName Quantity Belongs To Includes CATEGORY STORE H Occursat Storeld CustomerID (CustomerName Store Zip SALES TRANSACTION Involves CUSTOMER TID TDate Customer Zip PRODUCT ProductID Product Price ProductName VendorID (FK) CategoryID (FK) VENDOR VendorID Vendor Name REGION RegionID RegionName CATEGORY CategoryID CategoryName STORE StoreID Store Zip RegionID (FK) INCLUDES ProductID (FK) TID (FK) Quantity SALESTRANSACTION TID TDate StoreID (FK) CustomerID CK) CUSTOMER Customer ID Customer Name CustomerZip
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
