Question
MySQL - Create a view named order_item_products that returns columns from the Orders, Order_Items, and Products tables. Build your view in stages: a) This view
MySQL - Create a view named order_item_products that returns columns from the Orders, Order_Items, and Products tables. Build your view in stages:
a) This view should return these columns from the Orders table: order_id, order_date, tax_amount, and ship_date.
b) Next, add the product_name column from the Products table.
c) Next, add the following 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).
d) Submit the script file of your view and, an image of the view output.
order_items Columns item_id order_id product_id item_price discount_amount quantity Indexes Foreign Keys Triggers orders Columns order_id customer_id order_date ship_amount tax_amount ship_date ship_address_id card_type card_number card_expires billing_address_id Indexes products Columns product_id category_id product_code product_name description list_price discount_percent date_added Indexes Foreign Keys TriggersStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started