Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Oracle RMAN For Absolute Beginners

Authors: Darl Kuhn

1st Edition

1484207637, 9781484207635

Students also viewed these Databases questions

Question

A cover letter sent along with your rsum to a potential employer

Answered: 1 week ago