Music SQL Database

Introduction

In this project, I use Structured Query Language (SQL) to extract and analyze data stored in Chinook Database that holds information about a music store. In this project, I used SQL queries to create the visualization data images for assisting the Chinook team with understanding of their customers from the highest order volume country of total invoice and money of each country spent on the album to the order volume by Genre and many more.

SELECT
Customer.Country AS Country,
Total(Invoice.Total) AS "Total Sales"
FROM Invoice
INNER JOIN Customer
ON (BillingCountry IS NOT NULL AND Customer.CustomerId = Invoice.CustomerId)
GROUP BY Country
ORDER BY "Total Sales" DESC
LIMIT 5;

SELECT
Customer.Country AS BillingCountry,
AVG(Invoice.Total) AS AverageSpent,
max(Invoice.Total) AS HighestSpent
FROM Invoice
INNER JOIN Customer
ON (BillingCountry IS NOT NULL AND Customer.CustomerId = Invoice.CustomerId)
GROUP BY BillingCountry
ORDER BY AverageSpent;