This project showcases a comprehensive analysis of pizza sales data using MySQL. The goal was to derive meaningful insights from the data to help understand customer preferences, sales trends, and revenue generation. By leveraging SQL queries, I was able to dissect various aspects of the pizza sales, providing valuable information for business decision-making.
The analysis involved a series of SQL queries executed on a relational database containing multiple tables related to pizza sales. These tables included orders, order_details, pizzas, and pizza_types. The following steps outline the methodology used:
- Queries were crafted to retrieve data from the relevant tables and aggregate it to calculate total orders, total revenue, and identify patterns in the data.
- Join Operations: Several join operations were performed to combine data from different tables, allowing for a comprehensive analysis of sales and product information.
- Grouping and Ordering: Data was grouped and ordered to identify trends and generate summaries. This included grouping by pizza types, sizes, and order times.
- Calculations and Summarizations: The analysis included calculations such as summing up sales, counting orders, and determining averages to summarize the data effectively.
- MySQL: The primary software used for this analysis was MySQL, a widely-used relational database management system. It facilitated the storage, retrieval, and manipulation of the data.
- SQL: Structured Query Language (SQL) was used to write queries that interacted with the MySQL database to perform the analysis.
To complete this analysis, I first imported the relevant data into a MySQL database. Next, I identified key business questions that needed to be answered, such as total sales, popular pizza types, and revenue distribution. I then wrote and executed a series of SQL queries to extract and analyze the data, iterating and refining the queries to ensure accuracy and comprehensiveness.
The analysis yielded several insightful results:
- Total Orders and Revenue: The total number of orders placed and the total revenue generated from pizza sales were calculated, providing a high-level overview of business performance.
- Highest-Priced Pizza: The analysis identified the highest-priced pizza, helping understand premium product offerings.
- Popular Pizza Sizes and Types: The most common pizza size ordered and the top five most ordered pizza types were determined, indicating customer preferences.
- Order Distribution: The distribution of orders by hour of the day and the average number of pizzas ordered per day were analyzed, revealing peak times and daily trends.
- Category-Wise Analysis: The distribution of pizzas and revenue across different categories was examined, showing which categories were most popular and profitable.
- Cumulative Revenue: The cumulative revenue generated over time was tracked, illustrating the business growth trajectory.
- Revenue by Pizza Type: The top three most ordered pizza types based on revenue for each category were identified, highlighting key revenue drivers.