Question: question 1 Using the chinook database, write SQL SELECT queries to answer the following questions. You need to include your query as well as the

 question 1 Using the chinook database, write SQL SELECT queries to

question 1

Using the chinook database, write SQL SELECT queries to answer the following questions. You need to include your query as well as the result in your answer.

a. What is the title of the album with AlbumId 31?

b. List all the albums by artists with the word black in their name.

c. Find the name and length (in seconds) of all tracks that have both length between 30 and 40 seconds, and genre Latin.

d. Produce a table that lists each country and the number of customers in that country. (You only need to include countries that have customers.)

e. Find the top five customers in terms of sales i.e. find the five customers whose total combined invoice amounts are the highest.

f. For each genre of music, determine how many customers have bought at least one track from that genre.

playlists customers Playlistdt Name NVARCHAR(120) customerid FirstName NVARCHAR(40) LastName NVARCHAR(20) Company NVARCHAR(80) Address NVARCHAR7O) City NVARCHAR(40) State NVARCHAR(40) Country NVARCHAR(40) PostalCode: NVARCHAR(10) Phone NVARCHAR 24) Fax NVARCHAR(24) Email NVARCHAR(60) SupportRepld: INTEGER TUTORIAL Invoiceld INTEGER Customerld INTEGER BillingAddress NVAR BillingCity: NVARCHA playlist track Playlistd INTEGER Trackld: INTEGER MediaTypeld INTEGER Name: NVARCHAR 120) invoice items tracks Invoiceld INTEGER Trackld: INTEGER UnitPrice NUMERIC Quantity INTEGER Trackld INTEGER Albumld INTEGER MediaTypeld INTEGER Genreid INTEGER Name: NVARCHAR(120) Genreld: INTEGER employees Employeeld: INTEGER Milliseconds INTEGER Bytes INTEGER UnitPrice NUMERIC albums Abumld INTEGER Titde NVARCHAR(160) Artistid INTEGER Title NVARCHAR 30) ReportsTo INTEGER BirthDate:DATETIME HireDate: DATETIME Address NVARCHAR70) artists Artistd Name NVARCHAR(120)

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!