__STYLES__
Welcome to the documentation for my analysis project on the Global Superstore dataset! In this document, I'll walk you through the process of analyzing the dataset, uncovering insights, and creating visualizations to present the findings. The dataset comprises multiple tables containing information on orders, products, customers, and sales.
Data Cleaning
Before proceeding with my analysis, several data cleaning steps were undertaken:
The primary objectives of the analysis were to:
Tool Used
The analysis was conducted using SQL queries to extract and manipulate data from the dataset. Various analytical techniques, including aggregation, filtering, and segmentation, were applied to derive meaningful insights.
Queries and Explanations
SELECT top 3 Country, SUM(Profit) AS TotalProfit
FROM Orders
WHERE YEAR(Order_Date) = 2014
GROUP BY Country
ORDER BY TotalProfit DESC
This query selects the top three countries with the highest total profit in 2014 from the 'Orders' table. It calculates the sum of profits for each country and then orders the results in descending order to identify the top performers.
SELECT top 3 Sub_Category, AVG(Shipping_Cost) AS Avg_ShippingCost
FROM Orders
WHERE Country = 'United States'
GROUP BY Sub_Category
ORDER BY Avg_ShippingCost DESC
This query retrieves the top three subcategories with the highest average shipping cost in the United States from the 'Orders' table. It calculates the average shipping cost for each subcategory and then orders the results in descending order.
SELECT Country, SUM(Profit) AS TotalProfit
FROM Orders
WHERE YEAR(OrderDate) = 2014 AND Region = 'Africa'
GROUP BY Country
ORDER BY TotalProfit DESC;
This query calculates the total profit for each African country in 2014 from the 'Orders' table. It filters the data by the 'Africa' region and then groups the results by country, ordering them by total profit in descending order to compare Nigeria's profitability with other African countries.
SELECT top 1 Subcategory, SUM(Profit) AS TotalProfit
FROM Orders
WHERE Country IN ('Cambodia','Indonesia','Malaysia','Myanmar','Philippines', 'Singapore','Thailand','Vietnam')
GROUP BY Subcategory
ORDER BY TotalProfit ASC
This query identifies the product subcategory with the least profitability in Southeast Asia from the 'Orders' table. It filters the data by the countries comprising Southeast Asia and then calculates the total profit for each subcategory, ordering the results in ascending order to determine the least profitable subcategory.
SELECT top 1 City, AVG(Profit) AS AvgProfit
FROM Orders
WHERE Country = 'United States'
GROUP BY City
ORDER BY AvgProfit ASC
This query identifies the city with the lowest average profit in the United States from the 'Orders' table. It calculates the average profit for each city and then orders the results in ascending order to determine the least profitable city.
6. Which product subcategory has the highest average profit in Australia?
SELECT top 1 Subcategory, AVG(Profit) AS AvgProfit
FROM Orders
WHERE Country = 'Australia'
GROUP BY Subcategory
ORDER BY AvgProfit DESC
This query identifies the product subcategory with the highest average profit in Australia from the 'Orders' table. It calculates the average profit for each subcategory and then orders the results in descending order to determine the most profitable subcategory.
SELECT top 5 CustomerName, SUM(Profit) AS TotalProfit
FROM Orders
GROUP BY CustomerName
ORDER BY TotalProfit DESC
This query identifies the top five most valuable customers from the 'Orders' table based on total profit. It calculates the total profit for each customer and then orders the results in descending order to determine the most valuable customers and what they purchase.