Question: 1 . Create a view named customer _ addresses that shows the shipping and billing addresses for each customer. This view should return these columns

1. Create a view named customer_addresses that shows the shipping and billing addresses for each customer.
This view should return these columns from the Customers table: customer_id, email_address, last_name and first_name.
This view should return these columns from the Addresses table: bill_line1, bill_line2, bill_city, bill_state, bill_zip, ship_line1, ship_line2, ship_city, ship_state, and ship_zip.
2. Create a view named order_item_products that returns columns from the Orders, Order_Items, and Products tables.
This view should return these columns from the Orders table: order_id, order_date, tax_amount, and ship_date.
This view should return the product_name column from the Products table.
This view should return these columns from the Order_Items table: item_price, discount_amount, final_price (the discount amount subtracted from the item price), quantity, and item_total (the calculated total for the item).
3. Create a view named product_summary that uses the same table you used in in exercise 2. This view should return summary information about each product.
Each row should include product_name, order_count (the number of times the product has been ordered) and order_total (the total sales for the product).
4. Create a view named best_products that uses the same table you used in in exercise 3. The view should have the same columns returned. The view should only return the five best selling products by order_total.
I NEED HELP ONLY IN THE LAST QUESTION WHICH IS RELATED TO BEST_PRODUCTS. PLEASE PROVIDE ANSWER TO ONLY 4TH QUESTION.

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!