This project showcases an end-to-end sales data analysis for a pizza restaurant using SQL and Excel. The goal is to extract meaningful insights and key performance indicators (KPIs) from transactional data to support data-driven business decisions.
-
π― Objectives:
- Sales patterns by time and category
- Customer ordering behavior
- High and low performing products
- Opportunities for menu optimization and targeted promotions
-
Tools Used:
- SQL: Data cleaning, aggregation, and KPI calculations
- Microsoft Excel: Visualization, dashboard creation, and trend analysis
-
π Project Structure
- Data/ β Sample anonymized raw sales data
- SQL Queries/ β Contains all SQL scripts used for querying and KPI generation
- Excel Dashboard/ β Interactive dashboards and charts visualizing the key insights
-
KPIs Analyzed:
- π Total Revenue
- SELECT SUM(total_price) As Total_Revenue from pizza_sales;
- π° Average Order Value (AOV)
- SELECT SUM(total_price) / COUNT(DISTINCT order_id) as Average_Order_Value from pizza_sales;
- π Total Pizzas Sold
- SELECT SUM(quantity) As Total_Pizza_Sold from pizza_sales;
- π§Ύ Average Pizzas per Order
- SELECT CAST(CAST(SUM(quantity) As DECIMAL(10,2)) / CAST(COUNT(DISTINCT order_id) AS DECIMAL(10,2)) AS DECIMAL(10,2))as Average_Pizza_Order from pizza_sales
- π
Daily Trend of Total Orders
- SELECT DATENAME(DW,order_date) as order_day, COUNT(DISTINCT order_id) as Total_Orders from pizza_sales GROUP BY DATENAME(DW,order_date)
- β° Hourly Trend of Total Orders
- SELECT DATEPART(HOUR,order_time) As order_hours, COUNT(DISTINCT order_id) as Total_orders from pizza_sales GROUP BY DATEPART(HOUR,order_time) ORDER BY DATEPART(HOUR,order_time)
- π % of Sales by Pizza Size
- select pizza_size,sum(total_price) as total_price, CAST(((SUM(total_price) * 100) / (select sum(total_price) from pizza_sales)) as DECIMAL(10,2)) as percentage from pizza_sales group by pizza_size
- π Total Pizzas Sold by Pizza Category (Classic, Veggie, etc.)
- SELECT pizza_category, SUM(quantity) as Total_Quantity_Sold FROM pizza_sales WHERE MONTH(order_date) = 2 GROUP BY pizza_category ORDER BY Total_Quantity_Sold DESC
- π % of Sales by Pizza Category
- SELECT pizza_category, CAST(SUM(total_price) AS DECIMAL(10,2)) as total_revenue, CAST(SUM(total_price) * 100 / (SELECT SUM(total_price) from pizza_sales) AS DECIMAL(10,2)) AS PCT FROM pizza_sales GROUP BY pizza_category
- π Top 5 Best Sellers by Total Pizzas Sold
- select top 5 pizza_name, sum(quantity) as total_pizzas_sold from pizza_sales group by pizza_name order by total_pizzas_sold desc
- π Bottom 5 Best Sellers by Total Pizzas Sold
- select top 5 pizza_name, sum(quantity) as total_pizzas_sold from pizza_sales group by pizza_name order by total_pizzas_sold
- π Total Revenue
The dashboard created using Excel provides a clear and interactive overview of key business metrics, helping stakeholders make informed decisions quickly. Here's a breakdown of the insights covered:
-
π° Total Revenue
-
Displays overall revenue generated across all orders.
-
Highlights the restaurant's financial performance at a glance.
-
-
π§Ύ Average Order Value (AOV)
-
Indicates the average revenue per order.
-
Useful for identifying upsell/cross-sell opportunities.
-
-
π Total Pizzas Sold
-
Shows the volume of pizzas sold.
-
Helps gauge customer demand and popular selling days.
-
-
π¦ Average Pizzas per Order
- Gives an idea of order size and customer buying behavior.
-
π Daily Trend of Total Orders
-
A time-series chart showing how orders fluctuate day by day.
-
Useful for spotting peak days or drop-offs.
-
-
β° Hourly Trend of Total Orders
-
Reveals the most popular hours for orders.
-
Helps optimize staffing and kitchen operations during peak hours.
-
-
π % of Sales by Pizza Size
-
Visual breakdown (e.g., pie chart) showing which pizza sizes (Small, Medium, Large) drive most sales.
-
Aids in inventory planning and pricing strategies.
-
-
π Total Pizzas Sold by Pizza Category
-
Compares categories like Classic, Veggie, and Supreme.
-
Useful for menu refinement and marketing focus.
-
-
π % of Sales by Pizza Category
-
Highlights revenue contribution by category.
-
Helps in identifying the most profitable segments.
-
-
*π Top 5 Best Sellers by Total Pizzas Sold
-
Lists the most popular pizzas based on units sold.
-
Great for promotion and bundling strategies.
-
-
π Bottom 5 Best Sellers by Total Pizzas Sold
-
Identifies underperforming pizzas.
-
Useful for potential discontinuation or revamp
-
2025-05-29.20-39-45.mp4
Project By - Shivsharan Malage










