Question: Display all tracks from the Track table and their associated media type name from the MediaType table. ( 3 5 0 3 rows ) Create
Display all tracks from the Track table and their associated media type name from the
MediaType table. rows
Create two derived columns called MediaType and EncodingFormat.
Call the Track.Name column TrackName and the MediaType.Name column MediaName. The result set will have columns: TrackName, MediaName, MediaType and EncodingFormat For MediaType if the media is a video then display "Video" otherwise display "Audio". For EncodingFormat if the media name contains AAC then display "AAC", if it contains MPEG then display "MPEG" otherwise display "Unknown".
Display the total track count for each Media type. rows
The result set will have columns: MediaTypeName, TotalTracks. Hint: The TotalTracks for an MPEG audio file should equal
Sum the total sales for each Sales Support Agent grouped by year. rows
The result set should have columns: FirstName, LastName, SaleYear, TotalSales. Use Invoice.Total for TotalSales and Invoice.InvoiceDate for SaleYear. Hint: You should return rows. The TotalSales for Steve Johnson in should equal
Display the highest amount paid by each customer for a single invoice. rows
The result set should have columns: LastName, FirstName and MaxInvoice. MaxInvoice should be derived from the Invoice.Total column. Hint: Fynn Zimmermann's MaxInvoice should be
Check customer postal codes to determine if they are numeric. rows
The result set should have columns: Country, PostalCode and NumericPostalCode. NumericPostalCode is a derived column. If the PostalCode column has a numeric value then return "Yes". If it does not have a numeric value then return No If the PostalCode column has a NULL value then return "Unknown". Order the results by NumericPostalCode and Country.
Find the customers whose total purchases are greater than dollars. rows
The result set should have columns: FirstName, LastName, TotalSales. TotalSales is derived from the Invoice table.
Which artist has the most tracks in the database? row
The result set should contain column named TopArtist, and row with the name of the artist. Note: Don't hard code the answer. I need to see the query logic.
Assign customers to groups using a derived column named CustomerGrouping. rows
The result set will have columns: FirsName, LastName and CustomerGrouping.
Customers with a last name starting with AG will be assigned to Group
Customers with a last name starting with HM will be assigned to Group
Customers with a last name starting with NS will be assigned to Group
Customers with a last name starting with TZ will be assigned to Group
If there is no last name then the CustomerGrouping column should return NULL.
List all the artists and a count of how many albums each artist has in the database. rows
The result set will have columns: ArtistName and AlbumCount. Order the results by AlbumCount and ArtistName.
Place employees in departments based on their title. rows
The result set will have columns: FirstName, LastName, Title and Department. Department is derived column with the following criteria: If an employee's title contains "Sales" then their department is "Sales". If an employee's title contains IT then their department is "Technology". If an employee's title contains "Manager" then their department is "Management". The Management department will override Sales and Technology for employee placement. Order your results by Department.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
