Question
For this problem, we are using the Chinook Database again. (Remember to go the Helpful Links page on the course website for details about this
For this problem, we are using the Chinook Database again. (Remember to go the "Helpful Links" page on the course website for details about this database.)
Write a query that returns the Genres that I have purchased the most tracks of. I only care about genres that I've purchased at least 10 tracks. Please ignore any tracks costing a dollar or more (they are primarily TV shows). Please output two columns, the name of the genre ("Genre_Name") and the number of tracks purchased ("Number_Purchased"). Order from most purchases to least.
You need only need the tables: Track, Genre and Invoice Line. You may assume each row of invoice line has a quantity of 1.
Artist ArtistId Name Playlist PlaylistId Name Employee EmployeeId LastName FirstName Title Reports To BirthDate HireDate Address City State Country PostalCode Phone Fax Email K k
Step by Step Solution
3.44 Rating (144 Votes )
There are 3 Steps involved in it
Step: 1
Required Query SELECT genrename as GenreName countinvoicelinequantity as NumberPurchased from genre join track on trackgenreid genregenreid join invoiceline on invoicelinetrackid tracktrackid GROUP by ...Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started