Welcome to the Pizza Hut Sales Analysis project! This project leverages MySQL to analyze sales data and extract meaningful insights through a series of SQL queries. Each query addresses specific business questions, helping to understand sales trends, revenue generation, and customer preferences.
The project is organized around solving 12 key business questions using SQL:
-
📝 Retrieve the total number of orders placed:
- Count the total orders in the
orders
table.
- Count the total orders in the
-
💰 Calculate the total revenue generated from pizza sales:
- Compute total revenue by multiplying the quantity sold by the price of each pizza.
-
🏆 Identify the highest-priced pizza:
- Find the pizza with the highest price in the dataset.
-
📏 Identify the most common pizza size ordered:
- Determine the most frequently ordered pizza size.
-
🥇 List the top 5 most ordered pizza types along with their quantities:
- List the top 5 pizza types based on the quantity ordered.
-
🍕 Find the total quantity of each pizza category ordered:
- Calculate the total quantity ordered for each pizza category.
-
⏰ Determine the distribution of orders by hour of the day:
- Analyze how orders are distributed throughout the day.
-
📊 Category-wise distribution of pizzas:
- Show the distribution of pizzas across different categories.
-
📅 Group orders by date and calculate the average number of pizzas ordered per day:
- Calculate the average daily pizza orders.
-
💸 Determine the top 3 most ordered pizza types based on revenue:
- Identify the top 3 pizza types generating the most revenue.
-
📈 Calculate the percentage contribution of each pizza type to total revenue:
- Determine the revenue contribution percentage for each pizza category.
-
🔄 Analyze the cumulative revenue generated over time:
- Track the cumulative revenue over time.
The analysis is based on a hypothetical dataset consisting of the following tables:
orders
: Contains order details, includingorder_id
,order_date
, andorder_time
.orders_details
: Contains details about items in each order, includingorder_details_id
,order_id
,pizza_id
, andquantity
.pizzas
: Contains details about each pizza, includingpizza_id
,pizza_type_id
,size
, andprice
.pizza_types
: Contains details about pizza types, includingpizza_type_id
,name
, andcategory
.
The SQL queries used to answer each of the 12 questions are included in this repository. Each query is meticulously crafted to extract insights from the dataset, showcasing the power of SQL in data analysis and business intelligence.
This analysis provides valuable insights into Pizza Hut's sales patterns, revenue, and customer preferences. The queries demonstrate how SQL can be applied to uncover data-driven insights that inform business strategies.
To replicate this analysis:
- Clone this repository.
- Import the dataset into a MySQL database.
- Run the provided SQL queries to explore the data.
Feel free to modify the queries to explore other aspects of the sales data!
This project is licensed under the MIT License - see the LICENSE file for details.