Question: PLEASE WRITE AN ANSWER IN MYSQL WORKBENCH Use a subquery to calculate the average tax amount from each order if the tax amount is not

PLEASE WRITE AN ANSWER IN MYSQL WORKBENCH

Use a subquery to calculate the average tax amount from each order if the tax amount is not zero, then list the order_ids, customer_id, and tax_amount of the orders with tax amounts higher than the average.

orders table:

Columns:

order_id int(11) AI PK
customer_id int(11)
order_date datetime
ship_amount decimal(10,2)
tax_amount decimal(10,2)
ship_date datetime
ship_address_id int(11)
card_type varchar(50)
card_number char(16)
card_expires char(7)
billing_address_id int(11)

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!