An open API service indexing awesome lists of open source software.

https://github.com/hellymodikalpesh/pizza_sales_sql_analysis

A comprehensive SQL project analyzing pizza sales data across multiple tables. This project includes basic, intermediate, and advanced queries to answer business-critical questions related to revenue, order trends, and product performance.
https://github.com/hellymodikalpesh/pizza_sales_sql_analysis

sql

Last synced: 4 months ago
JSON representation

A comprehensive SQL project analyzing pizza sales data across multiple tables. This project includes basic, intermediate, and advanced queries to answer business-critical questions related to revenue, order trends, and product performance.

Awesome Lists containing this project

README

          

# Pizza Sales SQL Analysis 🍕

## Project Overview
This project analyzes pizza sales data from a fictional pizza chain. Using SQL, we answer key business questions related to order trends, revenue generation, and product performance. The dataset contains multiple tables, and queries range from basic data retrieval to advanced analytical insights.

## Objectives
The project is divided into three sections: **Basic**, **Intermediate**, and **Advanced** questions.

### Basic Queries:
- Retrieve the total number of orders placed.
- Calculate the total revenue generated from pizza sales.
- Identify the highest-priced pizza.
- Determine the most common pizza size ordered.
- List the top 5 most ordered pizza types along with their quantities.

### Intermediate Queries:
- Find the total quantity of each pizza category ordered (joins required).
- Analyze the distribution of orders by hour of the day.
- Determine the category-wise distribution of pizzas ordered.
- Calculate the average number of pizzas ordered per day by grouping orders by date.
- Identify the top 3 most ordered pizza types based on revenue.

### Advanced Queries:
- Calculate the percentage contribution of each pizza type to total revenue.
- Analyze cumulative revenue generated over time.
- Identify the top 3 most ordered pizza types based on revenue for each pizza category.

## Dataset
The project uses a dataset with **3 or more tables**, including details on orders, pizzas, and pizza categories.

### Table Details:
1. **Orders**: Contains information on order IDs, timestamps, and customer details.
2. **Order Details**: Links orders with specific pizzas and their quantities.
3. **Pizzas**: Provides details about individual pizzas, including type, size, and price.
4. **Pizza Types**: Categorizes pizzas into broader categories (e.g., Veg, Non-Veg).

## Tools Used
- SQL (structured queries for data manipulation and analysis)
- SQLite (or any other database engine for execution)

## Key Highlights
- Answers business-critical questions with SQL queries.
- Demonstrates practical use of joins, aggregations, rankings, and window functions.
- Showcases advanced analytical techniques like cumulative revenue calculation and percentage contribution analysis.

## How to Use
1. Clone this repository:
```bash
git clone https://github.com/HellyModiKalpesh/Pizza_Sales_SQL_Analysis.git