Most Expensive Tracks (chinook database)

Easy
3
84.2% Acceptance

Your objective in this lab is to test and hone your SQL skills using the chinook dataset.

Database Schema:

Below is a quick reminder of the table structures:

  1. Artist:

    • "ArtistId" (Primary Key)
    • "Name"
  2. Album:

    • "AlbumId" (Primary Key)
    • "Title"
    • "ArtistId" (Foreign Key to "Artist")
  3. Track:

    • "TrackId" (Primary Key)
    • "Name"
    • "AlbumId" (Foreign Key to "Album")
    • "UnitPrice"

Instructions:

  • Ensure you are using SQLite-compatible syntax and functions.
  • Make sure to always use double quotes around table and column names for clarity.
  • Adhere strictly to the provided table and column names.
  • Remember to often use the ORDER BY clause in your queries. The ordering of results is crucial for accurate evaluation.
  • Ensure that the names and order of the columns in your solution match the instructions provided in each challenge.

Challenges:

1. High-Priced Tunes: Identify the top 10 tracks with the highest prices. Your result should have two columns: "Name" and "UnitPrice". Make sure to order your results by "UnitPrice" in descending order to get the priciest tracks at the top.

Tips:

  • Pay close attention to the exact column names and table structures provided.
  • Always verify your queries and results before final submission.
  • Remember, precision and attention to detail are key to succeeding in this lab.

Challenges Information

Challenge 1: High-Priced Tunes

Objective: Your task is to identify the tracks that have the highest prices in the chinook dataset.

Details:

  • Tables to Use: Track
  • Columns to Select: Name, UnitPrice
  • Order: You will need to order the results based on the UnitPrice column in descending order to find the most expensive tracks first.
  • Limitation: Limit your output to the top 10 results to identify the ten most expensive tracks.
  • Output Columns: Your final output should consist of two columns: Name (to identify the track) and UnitPrice (to show the cost of the track).

Expected SQL Structure:

SELECT "Name", "UnitPrice" FROM "Track" ORDER BY "UnitPrice" DESC LIMIT 10;

Make sure to adhere to the provided structure and requirements for accurate results. Good luck!