Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Sqlite3: There is a single track with odd pricing: it is either an audio track whose price is not $0.99 or it is a video

Sqlite3:

There is a single track with "odd" pricing: it is either an audio track whose price is not $0.99 or it is a video track whose price is not $1.99. Write a query to identify this track and retrieve information about the entire album; specifically, you are to retrieve for each album track the following fields in order: the title of the album (album_title), the album's artist's name (artist_name), the name of the track (track_name), the name of the media type of the track (media_type), and the unit price of the track with the $ prepended (unit_price; e.g. $0.99). The tracks should be sorted in order of the TrackId (smallest first). Your query must not hardcode any numeric ids (e.g. TrackId, AlbumId, ArtistId). Furthermore, your query must identify the track with "odd" pricing according to the conditions stated above (i.e. you cannot hardcode which of the two conditions will identify the track). Your query must have subquery for full points

image text in transcribed

MediaType MediaTypeld Name Album Trackld Name Albumld MediaTypeld Genreld Composer Milliseconds Bytes Artistld Name Artistld Genre Genreld Name PlaylistTrack Playlistid Name Playlistld Trackld UnitPrice InvoiceLine InvoiceLineld Invoiceld Trackld UnitPrice Quantity Employee Employeeld k LastName FirstName Customer Customerld FirstName LastName | ReportsTo Invoice Invoiceld Customerld InvoiceDate BillingAddress BillingCity BillingState BillingCountry BillingPostalCode BirthDate HireDate Address Address State Country PostalCode Phone State Country PostalCode Phone SupportRepld MediaType MediaTypeld Name Album Trackld Name Albumld MediaTypeld Genreld Composer Milliseconds Bytes Artistld Name Artistld Genre Genreld Name PlaylistTrack Playlistid Name Playlistld Trackld UnitPrice InvoiceLine InvoiceLineld Invoiceld Trackld UnitPrice Quantity Employee Employeeld k LastName FirstName Customer Customerld FirstName LastName | ReportsTo Invoice Invoiceld Customerld InvoiceDate BillingAddress BillingCity BillingState BillingCountry BillingPostalCode BirthDate HireDate Address Address State Country PostalCode Phone State Country PostalCode Phone SupportRepld

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

Marketing Database Analytics

Authors: Andrew D. Banasiewicz

1st Edition

0415657881, 978-0415657884

More Books

Students also viewed these Databases questions

Question

Create a decision tree for Problem 12.

Answered: 1 week ago