Question: 1 . Create a view named customer _ addresses that shows the shipping and billing addresses for each customer. This view should return these columns
Create a view named customeraddresses that shows the shipping and billing addresses for each customer.
This view should return these columns from the Customers table: customerid emailaddress, lastname and firstname.
This view should return these columns from the Addresses table: billline billline billcity, billstate, billzip, shipline shipline shipcity, shipstate, and shipzip.
Create a view named orderitemproducts that returns columns from the Orders, OrderItems, and Products tables.
This view should return these columns from the Orders table: orderid orderdate, taxamount, and shipdate.
This view should return the productname column from the Products table.
This view should return these columns from the OrderItems table: itemprice, discountamount, finalprice the discount amount subtracted from the item price quantity, and itemtotal the calculated total for the item
Create a view named productsummary that uses the same table you used in in exercise This view should return summary information about each product.
Each row should include productname, ordercount the number of times the product has been ordered and ordertotal the total sales for the product
Create a view named bestproducts that uses the same table you used in in exercise The view should have the same columns returned. The view should only return the five best selling products by ordertotal.
I NEED HELP ONLY IN THE LAST QUESTION WHICH IS RELATED TO BESTPRODUCTS. PLEASE PROVIDE ANSWER TO ONLY TH QUESTION.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
