Back to Data Project 01
SQL · Live case study

Where a Digital Media Store Makes Its Money

I took a fictional music store's sales history and asked three real business questions: who are the most valuable customers, which countries are growing, and which artists were being undercounted because of messy data. Below are the queries I wrote to answer each one — click any of them to load and run it.

CTEs Window functions Conditional aggregation Recursive splits

Dataset: Chinook (digital music store). Analysis and queries are my own.

Three business questions, three queries

Each card loads a full query. Run it as-is, read the notes below the results, or edit the SQL and run your own version.

query.sql
Starting… / Ctrl + Enter

Query output

Results appear here after you run a query.

Database reference 11 tables · click to preview
Loading schema…

Techniques used

What each concept means, in plain English.