This project is a comprehensive analysis of a pizza sales database using MySQL. It consists of 15 business-oriented questions ranging from basic to advanced SQL queries. The goal is to extract meaningful insights using real-world SQL techniques such as joins, aggregations, window functions, and subqueries.
- Total number of orders placed
- Total revenue from pizza sales
- Highest-priced pizza
- Most common pizza size
- Top 5 most ordered pizza types
- Quantity of each pizza category ordered
- Order distribution by hour
- Category-wise pizza distribution
- Average number of pizzas ordered per day
- Top 3 pizza types by revenue
- % revenue contribution of each pizza type
- Cumulative revenue over time
- Top 3 pizzas by revenue for each category
mysql-pizza-sales-analysis/
βββ README.md # This file
βββ Questions.txt # All 15 questions
βββ solutions.sql # SQL queries for each question
βββ assets/ # (Optional) ERD, screenshots
β βββ schema.png
βββ docs/ # (Optional) Summary report
β βββ Pizza_SQL_Report.pdf
π¦ Tools Used
* MySQL 8.0+
* MySQL Workbench / DBeaver
* SQL Window Functions
* Joins, Aggregates, Subqueries
π Key Features
* Daily, hourly, and category-wise sales analysis
* Cumulative revenue using SUM() OVER()
* Top pizzas by quantity and revenue
* Percentage-based contribution calculations
π οΈ How to Use
* Load your database using the provided schema.
* Open solutions.sql in MySQL Workbench.
* Run each query to see insights based on real data.
* Modify or extend the queries to explore further.
π¨βπ» Author
Prabhav Gupta
π§ 2010prabhavgupta@gmail.com
π www.linkedin.com/in/prabhav91