Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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.

image text in transcribedimage text in transcribed

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 Triggers

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image_2

Step: 3

blur-text-image_3

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Understanding Oracle APEX 5 Application Development

Authors: Edward Sciore

2nd Edition

1484209893, 9781484209899

More Books

Students also viewed these Databases questions