
SQL PROECT
To provide valuable business insights from sales data by creating efficient SQL queries that highlight important performance metrics, helping businesses make data-driven decisions.Vision and Innovation
Description:
In this project, we explored pizza sales data to uncover patterns, trends, and actionable insights that could drive better business decisions. The analysis was performed using structured SQL queries, and the project focused on understanding customer preferences, sales performance, and revenue distribution. Some of the highlights include:
Revenue Analysis:
Calculated the overall revenue generated from pizza sales, showing how much income was brought in by different pizza types.
SQL QUERY..
SELECT ROUND(sum(order_details.quantity * pizzas.price),2) AS TOTAL_REVENU
FROM order_details
JOIN pizzas
ON pizzas.pizza_id = order_details.pizza_id;
Popular Products
Identified the highest-priced pizza and the most common pizza size ordered, enabling a better understanding of customer preferences.
SQL QUERY..
SELECT PizzaType, MAX(Price) AS HighestPrice FROM Orders GROUP BY PizzaType ORDER BY HighestPrice DESC LIMIT 1; SELECT PizzaSize, COUNT(*) AS Count FROM Orders GROUP BY PizzaSize ORDER BY Count DESC LIMIT 1;
Top Sellers
Listed the top 5 pizza types by order quantity, offering a clear picture of the most popular items in the menu.
SQL QUERY..
SELECT PizzaType, COUNT(*) AS OrderQuantity FROM Orders GROUP BY PizzaType ORDER BY OrderQuantity DESC LIMIT 5;
Advanced Insights:
Pizza Categories by Total Quantity Ordered:
SELECT PizzaCategory, SUM(Quantity) AS TotalQuantity FROM Orders GROUP BY PizzaCategory;
Distribution of Orders Across Different Times of Day:
SELECT EXTRACT(HOUR FROM OrderTime) AS Hour, COUNT(*) AS OrderCount FROM Orders GROUP BY Hour ORDER BY Hour;\Category-wise and Date-wise Distributions:
SELECT PizzaCategory, OrderDate, COUNT(*) AS OrderCount FROM Orders GROUP BY PizzaCategory, OrderDate; SELECT OrderDate, SUM(Revenue) AS DailyRevenue FROM Orders GROUP BY OrderDate ORDER BY OrderDate;Cumulative Revenue Growth Over Time:
SELECT OrderDate, SUM(Revenue) AS CumulativeRevenue FROM (SELECT OrderDate, SUM(Price) AS Revenue FROM Orders GROUP BY OrderDate) AS DailyRevenue GROUP BY OrderDate ORDER BY OrderDate;
Strategic Insights:
Percentage Contribution of Each Pizza Type to Overall Revenue:
WITH TotalRevenue AS ( SELECT SUM(Price) AS OverallRevenue FROM Orders ) SELECT PizzaType, (SUM(Price) / TotalRevenue.OverallRevenue) * 100 AS PercentageContribution FROM Orders, TotalRevenue GROUP BY PizzaType, TotalRevenue.OverallRevenue ORDER BY PercentageContribution DESC;
GITHUB LINK:: https://github.com/ibtihajjutt/Pizza-Sales-Data-Analysis-Using-SQL-
Conclusion
In conclusion, this project utilized structured SQL queries to analyze pizza sales data, providing valuable insights into customer preferences, sales performance, and revenue distribution. By examining total orders, revenue generated, popular products, and top-selling items, we were able to identify key trends and patterns that could guide business strategies. The analysis also offered deeper insights into pizza categories, order distribution across different times of the day, and cumulative revenue growth. These findings equip businesses with the information needed to make data-driven decisions and optimize their operations for increased revenue and customer satisfaction.

