This project analyzes motorcycle parts sales data to help the business better understand its wholesale revenue performance.
The company operates three warehouses — North, Central, and West — and serves both retail and wholesale clients. Since different payment methods incur different fees, the analysis focuses on calculating net revenue rather than looking only at total sales.
The goal is to understand how wholesale net revenue varies by product line, month, and warehouse.
The board of directors wants a clearer view of wholesale revenue across the business.
This analysis answers the following question:
How does wholesale net revenue vary across product lines, months, and warehouses after accounting for payment fees?
Only orders from Wholesale clients are included in the analysis.
The project uses a sales table containing motorcycle parts sales data from June to August 2021.
| Column | Description |
|---|---|
order_number |
Unique order number |
date |
Date of the order |
warehouse |
Warehouse where the order was made |
client_type |
Retail or Wholesale |
product_line |
Type of motorcycle part ordered |
quantity |
Number of products ordered |
unit_price |
Price per product |
total |
Total price of the order |
payment |
Payment method |
payment_fee |
Percentage of total charged for the payment method |
- North
- Central
- West
- Retail
- Wholesale
- Credit card
- Transfer
- Cash
The analysis follows these main steps:
-
Filter the sales data to include only Wholesale orders.
-
Calculate the payment fee for each order.
-
Calculate net revenue after deducting the payment fee.
-
Extract the month from the order date.
-
Group the results by:
- Month
- Warehouse
- Product line
-
Aggregate net revenue to compare wholesale performance across these dimensions.
Net Revenue = Total − (Total × Payment Fee)
- SQL
- PostgreSQL
- Data aggregation
- Date manipulation
- Conditional filtering
- Grouping and summarization
The analysis focuses on understanding:
- Which product lines generate the most wholesale net revenue?
- How does wholesale revenue change from month to month?
- Which warehouses contribute the most to wholesale net revenue?
- How does product-line performance differ across warehouses?
- How do payment fees affect the final revenue generated from wholesale orders?
The SQL analysis produces a summarized view of wholesale net revenue by:
Month → Warehouse → Product Line
This structure allows the business to compare revenue performance across different locations and time periods while accounting for the cost associated with each payment method.
By accounting for payment fees rather than relying solely on total sales, the analysis provides a more realistic view of the revenue generated from wholesale orders.
The results can help the business identify:
- Strong-performing product lines
- Differences in warehouse performance
- Monthly revenue patterns
- Areas where payment fees have a greater impact on revenue
- SQL data analysis
- Filtering business data
- Revenue calculations
- Date and month extraction
- Aggregation
GROUP BY- Business-oriented data analysis
- Translating a business question into a SQL analysis
motorcycle-parts-sales-analysis/
│
├── README.md
│
└── sql/
└── motorcycle_parts_analysis.sql