This project focuses on analyzing Pizza Hut sales data using SQL to answer real-world business questions.
The goal is to derive meaningful insights related to revenue, customer ordering patterns, pizza popularity, and category-wise performance using structured query language.
A total of 13 business-driven SQL queries were written and optimized to demonstrate strong command over SQL fundamentals and advanced concepts.
The analysis is performed on a relational dataset consisting of four CSV files.
Each table represents a different aspect of Pizza Hutβs sales operations.
Contains order-level information.
| Column Name | Description |
|---|---|
| order_id | Unique identifier for each order |
| date | Date on which the order was placed |
| time | Time at which the order was placed |
Contains item-level details for each order.
| Column Name | Description |
|---|---|
| order_details_id | Unique identifier for each order line item |
| order_id | References the corresponding order |
| pizza_id | References the pizza ordered |
| quantity | Number of pizzas ordered |
Contains pricing and size information for pizzas.
| Column Name | Description |
|---|---|
| pizza_id | Unique identifier for each pizza |
| pizza_type_id | References the pizza type |
| size | Pizza size (S, M, L, XL, XXL) |
| price | Price of the pizza |
Contains descriptive information about pizza types.
| Column Name | Description |
|---|---|
| pizza_type_id | Unique identifier for each pizza type |
| name | Name of the pizza |
| category | Pizza category (Classic, Veggie, Chicken, Supreme) |
| ingredients | Ingredients used in the pizza |
orders.order_idβorder_details.order_idorder_details.pizza_idβpizzas.pizza_idpizzas.pizza_type_idβpizza_types.pizza_type_id
These relationships enable comprehensive sales, revenue, and category-level analysis using SQL joins.
- Total number of orders placed
- Total revenue generated from pizza sales
- Highest priced pizza
- Most common pizza size ordered
- Top 5 most ordered pizza types by quantity
- Total quantity ordered per pizza category
- Hourly distribution of orders
- Category-wise pizza distribution
- Average number of pizzas ordered per day
- Top 3 pizza types based on revenue
- Percentage contribution of each pizza type to total revenue
- Cumulative revenue analysis over time
- Top 3 pizzas by revenue within each pizza category
- INNER JOINs
- GROUP BY & Aggregate Functions (SUM, COUNT, AVG)
- Subqueries
- Window Functions (RANK)
- Date & Time Analysis
- Revenue & Performance Metrics
- Translating business questions into SQL logic
- Writing optimized and readable SQL queries
- Applying window functions for ranking and cumulative analysis
- Understanding relational database structures and joins
This project demonstrates practical SQL skills required for data analyst roles.
It highlights the ability to analyze transactional data, extract business insights, and present results in a structured and professional manner.