Goal: Demonstrate basic SQL querying skills by exploring a sample music store database using SQLite.
Tools Used:
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.
SELECT * FROM Customer LIMIT 5;;
This query previews a few customer records to understand the available columns.
SELECT DISTINCT country FROM customer;
Identifies the countries from which the company has customers.
SELECT COUNT(*) AS total_invoices FROM invoice;
Returns the total number of purchases recorded.
SELECT billingcountry, SUM(total) AS total_sales
FROM invoice
GROUP BY billingcountry
ORDER BY total_sales DESC;
This aggregates total revenue per billing country.
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.
SELECT
, GROUP BY
, ORDER BY
, COUNT
, SUM
, LIMIT
, DISTINCT
๐ Stored in: assets/sql-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 |