This project showcases end-to-end SQL queries for analyzing a music store database. The queries are categorized into Beginner, Intermediate, and Advanced levels, each addressing business questions around customers, artists, invoices, and music preferences.
π’ Beginner Level
- Who is the most senior employee?
- Which countries have the most invoices?
- What are the top 3 invoice totals?
- Which city generates the most revenue (for a music festival promotion)?
- Who is the top customer based on spending?
π‘ Intermediate Level
- Who listens to Rock music? (with email and name)
- Top 10 artists with the most Rock music tracks
- Tracks with duration longer than the average
π΄ Advanced Level
- How much has each customer spent on the top-selling artist?
- Most popular music genre per country
- Top customer by spending in each country
- Joins (INNER JOIN, SELF JOIN)
- Subqueries
- CTEs (Common Table Expressions)
- Aggregation (Sum, Count, Avg)
- Window Functions (ROW_NUMBER)
- Filtering & Sorting (WHERE, ORDER BY, GROUP BY)
- Marketing Strategy: Identify top cities and countries for targeted campaigns.
- Customer Analytics: Discover loyal and high-spending customers.
- Artist Management: Recognize high-performing artists and genres.
- Business Expansion: Decide regions with high revenue potential for concerts or new releases.
- SQL (My SQL Syntax)
- MySQL Workbench