Joining Tables to Fetch Album Titles

Easy
5
65.8% Acceptance

You'll be working with the famous Chinook database, focusing on SQLite. The objective of this lab is to put your SQL skills to the test with practical exercises based on real-world-like data.

Dataset Overview

The Chinook dataset contains a rich set of tables that model a digital media store. Here's a quick overview of the tables you'll be working with:

  • Artist: Contains information about artists.
  • Album: Contains album titles along with associated artists.
  • Track: Contains information about songs or tracks.

Instructions

  1. Environment Setup: You don't need to worry about setting anything up! Everything is already in place for you to just dive in and start coding.

  2. Query File: All your SQL queries should be written and saved in the provided query.sql file.

  3. Column Naming: When crafting your SQL statements, ensure that your resulting columns match the expected names exactly. For instance, if you're asked to produce a column named "AlbumTitle", it should be labeled exactly that way in your query.

Challenge : Track-Album Association

Objective: Join the Track and Album tables to display the relationship between track names and their respective album titles.

Tables Used:

  • Track
  • Album

Task Details:

  1. Joining: You are required to perform an inner join between the Track and Album tables.

  2. Columns to Display:

    • TrackId from the Track table.
    • Name from the Track table. This should be labeled as TrackName.
    • Title from the Album table. This should be labeled as AlbumTitle.
  3. Ordering: The resulting dataset should be ordered by TrackId.

Expected Outcome:
On successful execution, your query should produce a list of tracks, displaying their TrackId, TrackName, and the AlbumTitle they belong to, ordered by TrackId.

Evaluation

Once you've written your solution in the query.sql file, it will be evaluated against a set solution to determine if you've passed the challenge. Ensure that your solutions match the given problem statements precisely, paying special attention to the "ORDER BY" clauses as they are crucial for matching outputs.

Best of luck, and happy querying!