Question: Use the Chinook database to write your SQL queries. Add comments or aliases whenever necessary. Don't forget to test your queries to verify their correctness.

Use the Chinook database to write your SQL queries.
Add comments or aliases whenever necessary.
Don't forget to test your queries to verify their correctness.
Copy and paste your queries under each question.
Each question: 15 pts (if you have them all right, there are 105 points to earn)
Display the country and the average total amount spent by customers from that country. Only include countries with an average total amount greater than $20.
Find the customers who have made the highest number of purchases. Display their first and last names along with the number of purchases.
Retrieve the track names, composers, and durations of tracks that have a duration between 180 and 240 seconds (inclusive).
Find the genres where the total number of tracks is greater than 20. Display the genre and the total number of tracks. Order the result by the total number of tracks in descending order.
Retrieve the track names and composers of tracks that belong to either the 'Rock' or 'Pop' genres.
Display the customer ID, first name, last name, and the total number of purchases made by each customer. Order the result by the total number of purchases in descending order.
List the top 5 artists with the most tracks. Display the artist name along with the number of tracks.
 Use the Chinook database to write your SQL queries. Add comments

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!