Answered step by step
Verified Expert Solution
Link Copied!
Question
1 Approved Answer

SQL Q.2) (25 points) Overview: Write a SELECT statement that lists product name and discount percentage for customers, but only include the products that have

SQL image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
image text in transcribed
Q.2) (25 points) Overview: Write a SELECT statement that lists product name and discount percentage for customers, but only include the products that have a greater than average discount percentage Details: Display customer name, email address, the product name, and the discount percentage Only include products that have a discount percent value that is higher than the average discount for all products. Replicate the result set below, matching data, formats, column headers, and sort order Results customer name email address Sherwood, Allan allan.sherwood@yahoo.com Gibson SG Sherwood, Allan allan.sherwood@yahoo.com Rodriguez Caballero 11 Zimmer, Barry Wilson, Frank Leefrankwilson@sbcglobal.net Fender Precision Goldstein, David david.goldstein@hotmail.com Fender Stratocaster Wilson, Frank Leefrankwilson@sbcglobal.net Fender Stratocaster Sherwood, Allan allan.sherwood@yahoo.com Gibson Les Paul Brown, Christine christineb@solarone.com discount _percent 52% 39% 38% 30% 30% 30% 30% 30% 30% product_name barryz@gmail.com Yamaha FG700S Gibson Les Paul Ludwig 5-piece Drum Set with Wilson, Frank Leefrankwilson@sbcglobal.net (9 rows returned) bals 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

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

Ai And The Lottery Defying Odds With Intelligent Prediction

Authors: Gary Covella Ph D

1st Edition

B0CND1ZB98, 979-8223302568

More Books

Students explore these related Databases questions