Back to projects
Case Study
E-commerce Profit Leak Analysis
Where is margin being destroyed?
SQL / DuckDBTableauPython
Orders analyzed
12,000
Revenue
€2,054,589
Profit
€214,041
Profit margin
10.42%
Avg. discount
17.39%
Loss-making order rate
16.01%

Business Problem
An e-commerce business needed to understand where profitability was eroding across categories, regions and discount strategies — without relying on assumptions.
Tools
- SQL / DuckDB
- Tableau
- Python
Methodology
- 1Built a DuckDB analytical layer on order-level data (12,000 orders)
- 2Calculated revenue, profit, margin and discount metrics by segment
- 3Identified loss-making orders and category-region combinations
- 4Visualized profitability drivers in Tableau for business stakeholders
- 5Translated SQL findings into actionable commercial recommendations
Main Insight
Margin leak is concentrated in Electronics / EU, and high discount levels systematically reduce margin.
Business Recommendations
- Review discount policy on Electronics in EU — highest margin erosion zone
- Cap promotional depth on categories with negative contribution margin
- Monitor loss-making order rate weekly as a leading profitability KPI
- Prioritize assortment and pricing fixes on weak category-region segments