Analyze a digital music store dataset to answer key business questions about customers, artists, and sales.
Used SQL queries to extract insights that can help the store improve marketing and customer engagement strategies.
- Database: MySQL
- Concepts: Joins, CTEs, Subqueries, Aggregate Functions, Window Functions
- Functions Used: SUM(), COUNT(), AVG(), RANK(), CONCAT(), ROUND()
- Who is the senior-most employee based on job title?
- Which country has the most invoices?
- What are the top 3 invoice totals?
- Which city generated the highest total sales?
- Who is the best (highest spending) customer?
- Who are the customers that listen to Rock music?
- Which artists have composed the most Rock songs (Top 10)?
- Which songs are longer than the average song length?
- How much did each customer spend on each artist?
- Which is the most popular genre in each country?
- Who is the top customer in each country based on total spending?
- πΊπΈ USA had the highest number of invoices (most customers).
- πΈ Rock was the most popular genre across multiple countries.
- π° Top spending customers were identified for potential loyalty rewards.
- ποΈ Prague generated the highest sales among all cities.
- π¨βπΌ Steve Johnson (example) was the senior-most employee in the store.
- INNER JOIN to combine data from multiple tables.
- GROUP BY and HAVING to summarize information.
- CTE and Window Functions (RANK, PARTITION BY) to rank customers and genres.
- Subqueries for comparing with averages.
- ORDER BY, LIMIT, and Aggregate Calculations for analysis.
- Improved ability to translate business questions into SQL queries.
- Hands-on experience with advanced SQL techniques.
- Enhanced understanding of data relationships and performance optimization.
This dataset is a sample Music Store Database used for SQL learning and practice.
(Contains tables: customer, invoice, artist, track, genre, employee, album)
- Download or clone this repository.
- Import the SQL file into your MySQL Workbench.
- Execute the queries one by one to see the results.
Ibrahim Alam
πΌ Aspiring Data Analyst | Skilled in SQL, Python, Power BI & Excel
π§ [email:- mribrahimalam18@gmail.com
linkedin:- www.linkedin.com/in/ibrahim-alam786 ]