Question: HERE ARE THE LINKS FOR THE DATABASES https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in Problem #2 The goal is to write a report of order detail records, along with the

 HERE ARE THE LINKS FOR THE DATABASES https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in Problem #2

HERE ARE THE LINKS FOR THE DATABASES

https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in

https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in

Problem #2 The goal is to write a report of order detail records, along with the names of the product being ordered. The challenge is the fact that the product names are not stored in the Order Details table. The names are in the Products table. So to accomplish our goal, we need to use a JOIN so that our SELECT statement has access to both the Order Details table and the Products table. Start with this SQL, and edit it to complete the goal below it: SELECT od.OrderID FROM OrderDetails AS od Modify that SQL so that the 2nd column returned is the product name for that order detail. That will require a JOIN to the Products table. Notice that I aliased the Order Details table as od You will alias the Products table as p . So, that 3rd column in the SELECT will be p.productName When completed, your output should look like this

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!