This project focuses on analyzing Spotify music streaming data using MySQL. The dataset was imported from Kaggle and explored using SQL queries ranging from basic filtering to advanced analytical techniques such as Common Table Expressions (CTEs) and Window Functions.
The objective of this project is to extract meaningful insights related to song popularity, artist performance, album trends, streaming behavior, and engagement metrics.
- MySQL
- MySQL Workbench
- SQL
- Git
- GitHub
-
Source: Kaggle Spotify Dataset
-
Records include information about:
- Artist
- Track
- Album
- Album Type
- Streams
- Views
- Likes
- Comments
- Danceability
- Energy
- Liveness
- Tempo
- Acousticness
- Official Video Status
- Platform Information
Table Used:
spotify_datasetImportant Columns:
- Artist
- Track
- Album
- Album_type
- Stream
- Views
- Likes
- Comments
- Danceability
- Energy
- Liveness
- Tempo
- official_video
- Licensed
- most_playedon
- SELECT
- WHERE
- DISTINCT
- ORDER BY
- LIMIT
- COUNT()
- SUM()
- AVG()
- MAX()
- MIN()
- GROUP BY
- HAVING
- Subqueries
- Common Table Expressions (CTEs)
- Window Functions
- ROW_NUMBER()
- SUM() OVER()
-
Tracks with more than 1 billion streams
-
Albums and their respective artists
-
Total comments on licensed tracks
-
Tracks belonging to album type "single"
-
Total tracks released by each artist
-
Average danceability of tracks in each album
-
Top 5 tracks with highest energy
-
Official videos with views and likes
-
Album-wise total views
-
Tracks streamed more on Spotify than YouTube
-
Top 3 most-viewed tracks for each artist using Window Functions
-
Tracks with above-average liveness score
-
Energy variation across albums using CTEs
-
Energy-to-Liveness ratio analysis
-
Cumulative likes analysis using Window Functions
- Several tracks have exceeded 1 billion Spotify streams.
- Certain artists dominate both streaming and engagement metrics.
- Albums show significant variation in danceability and energy levels.
- Official videos generally receive higher engagement through likes and views.
- Window Functions provide efficient ranking and cumulative analysis.
spotify-data-analysis/
│
├── dataset/
│ └── spotify_dataset.csv
│
├── sql_queries/
│ └── spotify_analysis.sql
│
└── README.md
Through this project, I gained hands-on experience in:
- Database creation and management
- Data import and preprocessing
- SQL query writing and optimization
- Exploratory data analysis using SQL
- Advanced analytical techniques using CTEs and Window Functions
- Version control using Git and GitHub
Prachi Sharma
SQL | MySQL | Data Analysis | GitHub Projects