Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

need 1,7,9 and 10 only please In this assignment, you will write queries for the following database. PART II: The CHINOOK database: The Chinook Database

image text in transcribed

image text in transcribed

image text in transcribed

need 1,7,9 and 10 only please

In this assignment, you will write queries for the following database. PART II: The CHINOOK database: The Chinook Database is about an imaginary video and music store. Each track is stored using one of the digital formats and has a genre. The store has also some playlists, where a single track can be part of several playlists. Orders are recorded for customers, but are called invoices. Every customer is assigned a support employee, and Employees report to other employees. MediaType MediaTypeld Name Genre Genreld Name \begin{tabular}{l} \multicolumn{1}{l}{ Employee } \\ \hline Employeeld \\ \hline LastName \\ \hline FirstName \\ \hline Title \\ \hline ReportsTo \\ \hline BirthDate \\ \hline HireDate \\ \hline Address \\ \hline City \\ \hline State \\ \hline Country \\ \hline PostalCode \\ \hline Phone \\ \hline Fax \\ \hline Email \\ \hline \end{tabular} \begin{tabular}{l} Customer \\ \begin{tabular}{|l|} \hline Customerld \\ \hline FirstName \\ \hline LastName \\ \hline Company \\ \hline Address \\ \hline City \\ \hline State \\ \hline Country \\ \hline PostalCode \\ \hline Phone \\ \hline Fax \\ \hline Email \\ \hline SupportRepld \\ \hline \end{tabular} \\ \hline \end{tabular} \begin{tabular}{|l|} \hline Invoiceline \\ \hline InvoiceLineld \\ \hline Invoiceld \\ \hline Trackld \\ \hline UnitPrice \\ \hline Quantity \\ \\ Invoice \\ \hline Invoiceld \\ \hline Customerld \\ \hline InvoiceDate \\ \hline BillingAddress \\ \hline BillingCity \\ \hline BillingState \\ \hline BillingCountry \\ \hline BillingPostalCode \\ \hline Total \\ \hline \end{tabular} Write SQL queries to answer the following: 1. -- Which artists did not make any albums at all? Include their names in your answer. 2- Which artists did not record any tracks of the Latin genre? 3-- Which video track has the longest length? 4-- Find the names of customers who live in the same city as the top employee (The one not managed by anyone). 5-- Find the managers of employees supporting Brazilian customers. 6-- How many audio tracks in total were bought by German customers? And what was the total price paid for them? 7-- Which playlists have no Latin tracks? 8-- What is the space, in bytes, occupied by the playlist "Grunge", and how much would it cost? (Assume that the cost of a playlist is the sum of the price of its constituent tracks). 9.- Which playlists do not contain any tracks for the artists "Black Sabbath" nor "Chico Buarque" ? 10-- List the names and the countries of those customers who are supported by an employee who was younger than 35 when hired. HINT: use year as the first parameter in DATEDIFF()

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

Database Marketing The Ultimate Marketing Tool

Authors: Edward L. Nash

1st Edition

0070460639, 978-0070460638

More Books

Students also viewed these Databases questions

Question

What are they doing well?

Answered: 1 week ago