This project analyzes retail operations data to understand revenue trends, regional performance, product profitability, and fulfillment efficiency.
The analysis simulates a real-world analyst workflow where raw transactional data is transformed into actionable business insights using SQL and lightweight visualization techniques.
Key focus areas include:
- KPI-driven sales trend analysis
- regional revenue performance
- product category profitability
- shipping delay diagnostics
- cumulative revenue tracking
Operations and commercial teams need timely insights into how revenue is evolving, which product segments are driving performance, and where logistics inefficiencies may impact customer satisfaction.
This project demonstrates how SQL-based analysis can be used to:
- monitor revenue performance over time
- identify top-performing regions and product categories
- detect shipping delays that may signal fulfillment bottlenecks
- support data-driven operational decision making
This project uses the Sample Superstore retail dataset.
The dataset includes fields such as:
- order dates
- ship dates
- sales
- profit
- region
- product category
- product sub-category
- product details
For this project, the Orders sheet was converted from Excel to CSV and saved as:
data/superstore.csv
operations-sql-analytics/
│
├── data/
│ └── superstore.csv
├── sql/
│ └── queries.sql
├── images/
├── README.md
├── requirements.txt
├── .gitignore
└── run_analysis.py
The workflow combines SQL-driven metric computation with Python-based visualization.
Steps include:
- Loading transactional data into a lightweight SQLite environment
- Writing business-focused SQL queries to compute operational KPIs
- Exporting query outputs for validation and reporting
- Generating visual summaries of revenue trends and logistics performance
- Translating results into operational insights
This approach mirrors early-stage analytics engineering and reporting pipelines used in production environments.
- How are sales and profit trending over time?
- Which regions generate the highest revenue?
- Which product categories and sub-categories perform best?
- What is the average shipping delay by product category?
- Which products generate the highest sales?
- How does revenue accumulate over time?
- multi-level aggregation using
GROUP BY - time-based KPI analysis using date transformations
- window functions for cumulative trend tracking
- business metric engineering (sales, profit, delay KPIs)
- dimensional slicing across region, category, and product levels
- exporting query outputs for downstream reporting workflows
- Revenue growth shows identifiable trend shifts across months, suggesting seasonality and campaign impact.
- Regional sales concentration highlights geographic dependency risk.
- Certain product categories exhibit longer average shipping times, indicating potential fulfillment constraints.
- A small subset of products contributes disproportionately to total revenue.
Create a virtual environment:
Mac / Linux:
python3 -m venv .venv
source .venv/bin/activateWindows:
python -m venv .venv
.venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtRun the analysis:
python run_analysis.pyOutputs will be written to the project root and images/ folder.
This project began as a quick SQL exploration exercise and was later expanded with visualization and structured documentation to better communicate operational insights.


