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

Write a query using JOINS to list the last name,first name and OrderID for every

ID: 3596403 • Letter: W

Question

Write a query using JOINS to list the last name,first name and OrderID for every customer who currently has an order for any product with IPOD in the description.

(TCO 7) Write a query using JOINS to list the last name,first name and OrderlD for every customer who currently has an order for any product with IPOD in the description SalesRep PK RepID int Customer 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 OrderlD int FK1 ReplD FK1 CustomerlD int OrderDate date ShipDate date Part PK PartID int OrderLine Description varchar(20) UnitsOnHand int ItemClass Retail Cost PK,FK1 OrderlDint PK,FK2 PartID int char(4) decimal(10,2) decimal(10,2) Quantity int

Explanation / Answer

select LastName,FirstName,OrderID from Customer JOIN Order on Customer.CusstomerID=Order.CustomerID JOIN OrderLine on Order.OrderID=OrderLine.OrderID JOIN Part on OrderLine.PartID=Part.PartID and Part.Description like '%IPOD%';

This query will join 4 tables customer,order and orderline and part with their corresponding ids matched and will checks for the part having description IPOD and will give those corresponding partid with this by matching corresponding criteria written finally it will print the required results.

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