A complete end-to-end Supply Chain Data Analysis project built using MySQL. Designed a normalized relational database from scratch with 4 interconnected entities β Customers, Suppliers, Products, and Orders β and wrote 20+ complex SQL queries to extract actionable business insights including revenue trends, supplier performance, and customer behavior analysis.
π‘ Business Problem: A supply chain company needed visibility into revenue trends, supplier efficiency, and customer purchasing patterns to make data-driven decisions.
- Design and implement a normalized relational database
- Perform CRUD operations and data validation
- Analyze year-over-year revenue trends
- Evaluate supplier performance and delivery efficiency
- Identify top customers and high-value segments
- Build stored procedures for reusable reporting
| Tool | Purpose |
|---|---|
| MySQL | Database management |
| MySQL Workbench | Query execution & visualization |
| SQL | Data analysis & reporting |
βββββββββββββββ βββββββββββββββ
β customers β β suppliers β
βββββββββββββββ βββββββββββββββ
β customer_id βββββ ββββΊβ supplier_id β
β name β β β β name β
β city β β β β city β
β country β β β β rating β
βββββββββββββββ β β βββββββββββββββ
β β
βββββββββββββββ β β βββββββββββββββ
β orders β β β β products β
βββββββββββββββ β β βββββββββββββββ
β order_id β βββ β product_id β
β customer_id βββββββββββ supplier_id β
β product_id β β name β
β quantity β β category β
β order_date β β unit_price β
βββββββββββββββ βββββββββββββββ
| Table | Records | Description |
|---|---|---|
| customers | 15 | Customer details across India |
| suppliers | 8 | Supplier information with ratings |
| products | 20 | Product catalog with pricing |
| orders | 50 | Order transactions (2022-2023) |
- Total revenue generated across all orders
- Year-over-Year (YoY) revenue trend (2022 vs 2023)
- Monthly and quarterly revenue breakdown
- Revenue by product category with percentage share
- Top 5 customers by total spending
- Customer order frequency and average order value
- City-wise customer revenue contribution
- High value customers (above average spending) using Subqueries
- Supplier-wise revenue and order volume
- Supplier rating vs revenue correlation
- Average delivery time analysis
- Performance categorization using CASE statements
- Top 5 best selling products by revenue
- Above average revenue products using Subqueries
- Low stock alerts (below 100 units)
- Category-wise revenue analysis
- Stored Procedures for customer and yearly revenue reports
- CRUD operations for data validation
- Complex JOINs across multiple tables
- Subqueries for comparative analysis
π Revenue grew consistently from 2022 to 2023
π Electronics is the #1 revenue generating category
β Higher rated suppliers (4.5+) generate 40% more revenue
π Top 5 customers contribute 35%+ of total revenue
β οΈ 3 products have critically low stock (below 100 units)
π Average delivery time across all suppliers: 5 days
Supply-Chain-SQL-Analysis/
β
βββ π queries/
β βββ 01_create_database.sql β Database & table creation
β βββ 02_insert_data.sql β Sample data insertion (50+ records)
β βββ 03_analysis_queries.sql β 20+ business analysis queries
β
βββ π screenshots/
β βββ yoy_revenue.png β Year-over-year revenue results
β βββ top_products.png β Top 5 products by revenue
β βββ supplier_performance.png β Supplier analysis results
β βββ top_customers.png β Top customers by spending
β βββ business_summary.png β Complete business dashboard
β
βββ README.md
# Step 1: Open MySQL Workbench and connect to local server
# Step 2: Create database and tables
source queries/01_create_database.sql
# Step 3: Insert sample data
source queries/02_insert_data.sql
# Step 4: Run analysis queries
source queries/03_analysis_queries.sqlSELECT
YEAR(o.order_date) AS order_year,
COUNT(o.order_id) AS total_orders,
ROUND(SUM(o.quantity * p.unit_price), 2) AS total_revenue,
ROUND(AVG(o.quantity * p.unit_price), 2) AS avg_order_value
FROM orders o
JOIN products p ON o.product_id = p.product_id
GROUP BY YEAR(o.order_date)
ORDER BY order_year;SELECT
s.supplier_name,
s.rating,
COUNT(o.order_id) AS total_orders,
ROUND(SUM(o.quantity * p.unit_price), 2) AS total_revenue,
CASE
WHEN s.rating >= 4.5 THEN 'Excellent'
WHEN s.rating >= 4.0 THEN 'Good'
ELSE 'Average'
END AS performance_category
FROM orders o
JOIN products p ON o.product_id = p.product_id
JOIN suppliers s ON p.supplier_id = s.supplier_id
GROUP BY s.supplier_id, s.supplier_name, s.rating
ORDER BY total_revenue DESC;- Designing normalized relational databases from scratch
- Writing complex multi-table JOINs for business reporting
- Using subqueries for comparative and filter-based analysis
- Building stored procedures for reusable reports
- Performing data validation using CRUD operations
- Translating business requirements into SQL queries
Kiran U
BCA Graduate | PGP in Data Science & Generative AI β Great Learning, Bangalore
β If you found this project useful, please give it a star!


