Question: SQL Q.1) (25 points) Overview: Write a SELECT statement that summarizes the guitar shop's orders, including only those orders that a maximum item discount greater
Q.1) (25 points) Overview: Write a SELECT statement that summarizes the guitar shop's orders, including only those orders that a maximum item discount greater than 200 Details: Display order id, the number of items within the order, the total of all items for the order and the maximum discount of the items in the order. Only include orders that have a maximum item discount amount that is greater than 200. Sort the results by the order_id Hint: To calculate the price of a specific order item, do the following (item_price - discount_amount) *quantity Results order id num items order tota max item discount 839.30 359.70 4 240.00 209.70 9 489.30 (5 rows returned) my-guitar-shop Tables address-copy Columns addressd - customer id line! line2 City state zip-code phone disabled Indexes Foreign Keys Triggers addresses Columns addressd - customer id line2 city zip-code phone disabled Indexes Foreign Keys > Triggers administrators Columns admin-d email_address password first_name last_name Indexes Foreign Keys Triggers categories Columns category_id category_name Indexes Foreign Keys Triggers customers Columns customer id email_address password first name last_name shipping_address_id billing_address_id indexes Foreign Keys Triggers order_copy Columns order_id customer id order_date ship-amount tax, amount ship_date ship-address-d card_type card numbe rard exnires zip-code phone disabled indexes Foreign Keys Triggers administrators C] columns admin_id email address password first name last_name indexes Foreign Keys Triggers categories [0] Columns category_id category_name indexes Foreign Keys Triggers customers card-expires billing-address-d Indexes Foreign Keys Triggers orderitems Columns - temjd orderid product_id item-price - discount amount quantity Indexes Foreign Keys Triggers orders Columns orderid customer_id orderdate ship-amount taxamount - - - shin date ship-date ship_address_id card-type gh Indexes card_number card-expires billing-address-id Foreign Keys Triggers products ID columns product_id category_id product_code product-name description list_price discount-percent dateadded - indexes Foreign Keys Triggers Views
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
