Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

Using a subquery, list the details of all orders placed by SUE JONES. SalesRep C

ID: 3692651 • Letter: U

Question

Using a subquery, list the details of all orders placed by SUE JONES.

SalesRep Customer PK ReplD int varchar(20) varchar(20) PK CustomerlD int LastName FirstName CommissionRatedecimal(10,2) LastName varchar(20) FirstName varchar(20) Street City State Zipcode Balance varchar(20) varchar(20) char(2) char(5) decimal(10,2) int Order PK OrderlDint FK1 ReplD FK1 CustomerlD int OrderDate date ShipDate date Part PK PartID int Description varchar(20) UnitsOnHandint ItemClass Retail Cost OrderLine PK,FK1OrderID int PK,FK2 PartlD int char(4) decimal(10,2) decimal(10,2) Quantity int

Explanation / Answer

Answer for Question:

This below sub query will list the all the orders order by the custmer name Sue Jones .

This below sub query will match the custmer ID in Order table ..If it is matches any of the orders odder by custmer will
list details of OrderDate and ShipDate.


SELECT O.OrderDate, O.ShipDate FROM Oredr O
     WHERE O.CustomerID IN ( SELECT C.CustomerID from Customer where FisrName == 'SUE' and LastName == 'Jones')

Hire Me For All Your Tutoring Needs
Integrity-first tutoring: clear explanations, guidance, and feedback.
Drop an Email at
drjack9650@gmail.com
Chat Now And Get Quote