Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Part 3: Using the database: Write SQL queries for each of the questions below. (1) Find the genre which has at most 1 track. Print

Part 3: Using the database: Write SQL queries for each of the questions below. image text in transcribed(1)

Find the genre which has at most 1 track. Print the name of such genre. Number of rows returned in the result = 1

A) Find the tracks that were purchased in California (CA) or Washington (WA). Print the name of such tracks. Number of rows returned in the result = 151

B) Find the tracks that have been purchased in quantities greater than 5. Print the name of such tracks. Number of rows returned in the result = 0

C) Find the tracks which cost less than a dollar but the track length (Milliseconds) is more than the average track length in this database. Print the name of such tracks. Number of rows returned in the result = 282

TEE Track Trackld T Album Artist Artistld Name MediaType MediaTypeld Name Tite Artistld Albumld MediaTypeld Genreld Composer Milliseconds Genre Genreld Name Playlist Playlistd Name PlaylistTrack Playlistic Trackld Bytes UnitPrice Employee Employeeld LastName FirstName InvoiceLine InvoiceLineld Invoiceld Trackld UnitPrice Quantity Customer Customerld FirstName LastName Company Address ReportsTo BirthDate HireDate Address City State Country PostalCode Phone Fax Email Invoice Invoiceld Customerld InvoiceDate illingAddress BillingCity BillingState BillingCountry State Country PostalCode Fax SupportRepld Total

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

Practical Azure SQL Database For Modern Developers Building Applications In The Microsoft Cloud

Authors: Davide Mauri, Silvano Coriani, Anna Hoffma, Sanjay Mishra, Jovan Popovic

1st Edition

1484263693, 978-1484263693

More Books

Students also viewed these Databases questions