SQL Analysis of Chinook Music Store Database

Syif Bhuiyan

Goal: Demonstrate basic SQL querying skills by exploring a sample music store database using SQLite.
Tools Used:
SQLite
DB Browser for SQLite (Free GUI tool)

๐Ÿ“˜ Project Overview

This beginner-friendly SQL project analyzes data from the Chinook database, which simulates a digital music store. The database includes tables for customers, invoices, tracks, artists, albums, and more.
The goal is to write and interpret simple SQL queries to extract insights about customer demographics and purchasing patterns.

๐Ÿ“ฆ Dataset

Schema Includes:
Customers
Invoices
InvoiceLines
Tracks
Albums
Artists
Employees

๐Ÿ” SQL Queries & Outputs

1. ๐Ÿง‘ First 5 Customers

SELECT * FROM Customer LIMIT 5;;

This query previews a few customer records to understand the available columns.

2. ๐ŸŒ Unique Countries with Customers

SELECT DISTINCT country FROM customer;

Identifies the countries from which the company has customers.

3. ๐Ÿงพ Total Number of Invoices

SELECT COUNT(*) AS total_invoices FROM invoice;

Returns the total number of purchases recorded.

4. ๐Ÿ’ฐ Total Sales by Country

SELECT billingcountry, SUM(total) AS total_sales
FROM invoice
GROUP BY billingcountry
ORDER BY total_sales DESC;

This aggregates total revenue per billing country.

5. ๐Ÿ† Top 5 Customers by Revenue

SELECT customerid, SUM(total) AS amount_spent
FROM invoice
GROUP BY customerid
ORDER BY amount_spent DESC
LIMIT 5;

Ranks the customers who spent the most.

๐Ÿ“Š Key Insights

Top revenue-generating countries include the USA, Canada, and France.
Customers are distributed across more than a dozen countries.
A small number of customers contribute to a large portion of the revenue.

๐Ÿงฐ What I Practiced

Connecting to and browsing an SQLite database.
Writing simple SQL queries using:
SELECT, GROUP BY, ORDER BY, COUNT, SUM, LIMIT, DISTINCT
Using a graphical SQL tool (DB Browser) to explore and query a database.

๐Ÿ–ผ๏ธ Screenshots

๐Ÿ“ Stored in: assets/sql-project/ ๐Ÿ“Œ
๐Ÿ“Œ
๐Ÿ“Œ
๐Ÿ“Œ
๐Ÿ“Œ
โ€”

๐Ÿ“ Files in this Project

File Description Chinook_Sqlite.sqlite The SQLite database file sql-chinook-analysis.md This markdown report assets/sql-project/ Folder with screenshots of query results

๐Ÿ”— References

Like this project

Posted May 19, 2025

Analyzed Chinook music store database using SQL to extract customer insights.

Likes

1

Views

0

Automated Sales Monitoring Tool Development
Automated Sales Monitoring Tool Development
Customer Demographics and Spending Analysis
Customer Demographics and Spending Analysis

Join 50k+ companies and 1M+ independents

Contra Logo

ยฉ 2025 Contra.Work Inc