Question: Write a SELECT statement that returns one row for each musician that has orders with these columns: The email_address column from the Musicians table A

  1. Write a SELECT statement that returns one row for each musician that has orders with these columns:

The email_address column from the Musicians table

A count of the number of orders

The total amount for each order (Hint: First, subtract the discount amount from the price. Then, multiply by the quantity.)

Return only those rows where the musician has more than 1 order.

Sort the result set in descending sequence by the sum of the line item amounts.

  1. Modify the solution to exercise 1 so it only counts and totals line items that have an item_price value thats greater than 400.

Database Schema: ------------------------------ Tables: musicians, orders, order_instruments Table columns ----------------------- musicians: musician_id, email_address, password, first_name, last_name, shipping_address_id, billing_address_id orders: order_id, musician_id, order_date, ship_amount, tax_amount, ship_date, ship_address_id, card_type, card_number, card_expires, billing_address_id order_instruments: item_id, order_id, instrument_id, item_price, discount_amount, quantity

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!