Skip to content

Harshit0699/Music-Store-Database-Analysis-Using-SQL

Repository files navigation

Music Store Database Analysis

Project Overview

This project involves analyzing a Music Store Database using SQL queries to extract insights and uncover trends related to music sales, customer behaviors, and artist popularity. The analysis is implemented through a series of SQL queries each designed to address specific questions related to the business operations of a hypothetical music store.

Repository Structure

- SQL data analysis.sql      - Contains all the SQL queries used to perform the database analysis
- Music Store database.sql   - Contains data used is analysis
- Music database schema.png  - Can be used to understand data

Queries and Analysis

This analysis covers a range of queries to explore different aspects of the database:

  1. Senior-most Employee: Identifies the most senior employee based on job title.
  2. Top Countries by Invoices: Lists countries generating the most invoices.
  3. Top Invoice Values: Finds the top three values of total invoices.
  4. City with Highest Sales: Searches for the city with the highest sum of invoice totals.
  5. Best Customer: Determines the customer who has spent the most money.
  6. Rock Music Listeners: Lists all customers who prefer Rock music.
  7. Top Rock Artists: Identifies the top 10 rock artists by track counts.
  8. Long Track List: Compiles tracks longer than the average track length.
  9. Spending by Customer on Artists: Calculates total spending by each customer on artists.
  10. Popular Music Genre by Country: Identifies the most popular music genre in each country.
  11. Top Spenders by Country: Shows the top spender in each country.

Prerequisites

Ensure you have a SQL-compatible database management system (DBMS) installed, such as MySQL, PostgreSQL, or SQLite, to run the queries contained in the SQL file.

Installation

  1. Clone the repository locally:
git clone https://github.com/Harshit0699/MUSIC-STORE-DATAB...
  1. Open your DBMS and create a connection to your database server.
  2. Import the Music Store Database to your DBMS (Database file not included in this repository).
  3. Open the SQL data analysis.sql file and run the queries in your DBMS to see the results.

Contributing

Contributions to enhance the current analysis or extend the range of query topics are highly appreciated. Please fork the repository and submit a pull request with your proposed changes.

License

This project is open-sourced under the MIT License.

Contact

For any further questions or comments, feel free to reach out to (https://github.com/Harshit0699).

About

Data analysis on music store database using SQL

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published