Skip to content

BlladeRunner/superstore-sql-analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ›’ Superstore Sales Analysis (SQLite + SQL)

๐Ÿ“Š Project Overview

This is a SQL portfolio project based on the classic Sample Superstore dataset.
The goal is to explore and analyze key business questions such as:

  • Which customers generate the most profit?
  • Which regions and categories perform best?
  • How do discounts impact profit margins?

The project demonstrates proficiency in SQL, business analysis, and data storytelling through queries.


๐Ÿงฑ Dataset

  • Source: sample_superstore.csv (public Kaggle dataset)
  • Size: ~10,000 rows
  • Date Range: 2014-10-10 โ†’ 2017-12-30
  • Target Table: superstore (created by setup_superstore.sql)
  • Key Columns:
    OrderDate (YYYY-MM-DD), Sales (REAL), Profit (REAL), Discount (0โ€“1),
    Category, SubCategory, Segment, Region, CustomerName, ProductName

โš™๏ธ How to Reproduce

# 1๏ธโƒฃ Build or refresh the SQLite database and load the CSV
sqlite3 superstore.db ".read setup_superstore.sql"

# 2๏ธโƒฃ Run analysis queries (e.g. queries.sql)
# Inside VS Code with SQLTools: open queries.sql โ†’ select a statement โ†’ Ctrl+E, Ctrl+E

๐Ÿงฎ Analysis Highlights

The analysis includes:

  • ๐Ÿ† Top-10 customers by total profit and sales volume.
  • ๐Ÿ’ฐ AOV by category (Average Order Value).
  • ๐ŸŒ Regional and segment-level performance.
  • ๐Ÿ“‰ Impact of discounts on margins and profit.
  • ๐Ÿงฉ ABC classification and profitability cohorts.

๐Ÿง  Key Insights

  • The Consumer segment accounts for ~50% of total sales but lower profit margins.
  • The Corporate segment is the most profitable overall.
  • Furniture category has the lowest profit-to-sales ratio due to high shipping costs.
  • Regions West and East outperform others in both revenue and profit.
  • Discounts above 30% consistently destroy profit margins.

๐Ÿ’ผ Business Relevance

This analysis can help retail and e-commerce managers:

  • Identify the most profitable customer segments and regions.
  • Optimize discount strategies to avoid margin erosion.
  • Focus marketing campaigns on high-value customers.

๐Ÿ”™ Back to Portfolio

About

SQL analysis on Sample Superstore (SQLite)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published