- Introduction
- Dataset
- Objective
- SQL Queries
- Analysis Results
- Getting Started
- How to Use
- Contributing
- License
This project involves the analysis of pizza sales data using SQL. The primary goal is to derive insights from the data, such as sales trends, popular pizza types, and revenue generation over time. The analysis is performed using a series of SQL queries on a database containing various tables related to pizza sales.
The dataset used for this analysis includes several tables:
- Orders: Contains order details such as order ID, order date, and customer information.
- Pizzas: Contains details about the pizzas offered, including pizza ID, name, size, and price.
- Order Details: Contains information about the items included in each order, including quantity and pizza ID.
- Customers: Contains customer information, such as customer ID, name, and contact details.
The main objectives of this project are:
- To identify the most popular pizzas based on sales quantity.
- To analyze sales trends over different periods (daily, monthly, yearly).
- To calculate total revenue generated by each pizza type.
- To determine the top customers based on order frequency and spend.
The analysis is carried out through a series of SQL queries, including:
- Sales by Pizza Type: Query to determine the most popular pizzas.
- Revenue by Month: Query to calculate monthly revenue.
- Top Customers: Query to identify the top customers by the number of orders and total spend.
- Sales Trends: Queries to analyze daily, monthly, and yearly sales trends.
You can find all the SQL queries used for the analysis in the SQL Queries file.
The key findings from the analysis include:
- The top 5 most popular pizzas.
- The peak sales periods (e.g., certain months, weekends).
- The pizzas that generate the most revenue.
- The top 10 customers contributing to the sales.
These insights can be found in the Analysis Results file, where detailed descriptions and visualizations (if applicable) are provided.
To run the analysis on your local machine, follow these steps:
-
Clone the Repository:
git clone https://github.com/tejaswi2086/pizza-sales-analysis.git cd pizza-sales-analysis
-
Set Up the Database:
- Import the provided dataset into your SQL database.
- Ensure that the database structure matches the expected schema (Orders, Pizzas, Order Details, Customers).
-
Run the SQL Queries:
- Use your preferred SQL client to execute the queries provided in the
sql_queries.sql
file. - Analyze the output to gain insights into the pizza sales.
- Use your preferred SQL client to execute the queries provided in the
- For Data Analysis: Execute the SQL queries in the
sql_queries.sql
file to perform the analysis. - For Learning: Review the SQL queries to understand how to analyze sales data using SQL.
- For Customization: Modify the queries or dataset to explore different aspects of the sales data.
Contributions are welcome! If you'd like to improve the analysis, fix bugs, or add new features, feel free to submit a pull request. Please ensure that your contributions align with the project's objectives.