Skip to content

soniya-builds/SQL-For-Data-Analysis

Repository files navigation

🍕 Pizza Sales Analysis(SQL Project)

📌 Project Overview

This project analyzes pizza sales data for a fictional company Pizzaburg using SQL.
The goal of the project is to extract meaningful business insights from raw sales data by writing optimized SQL queries ranging from basic to advanced levels.

The analysis helps understand:

  • Customer ordering behavior
  • Revenue trends
  • Popular pizza types and categories
  • Time-based sales patterns

This project is ideal for demonstrating SQL querying, joins, aggregation, and analytical skills.

🗂️ Dataset Description

The database consists of multiple related tables, including (but not limited to):

  • orders – order details with date and time
  • order_details – quantity of pizzas per order
  • pizzas – pizza size and price information
  • pizza_types – pizza name and category

🛠️ Tools & Technologies

  • SQL (MySQL / PostgreSQL compatible queries)
  • GitHub for version control
  • Relational Database Concepts
    • Joins
    • Aggregations
    • Subqueries
    • Window functions

📊 Business Questions Solved

🔹 Basic Analysis

  1. Retrieve the total number of orders placed
  2. Calculate the total revenue generated from pizza sales
  3. Identify the highest-priced pizza
  4. Identify the most common pizza size ordered
  5. List the top 5 most ordered pizza types along with their quantities

🔹 Intermediate Analysis

  1. Find the total quantity of each pizza category ordered
  2. Determine the distribution of orders by hour of the day
  3. Find the category-wise distribution of pizzas
  4. Group orders by date and calculate the average number of pizzas ordered per day
  5. Determine the top 3 most ordered pizza types based on revenue

🔹 Advanced Analysis

  1. Calculate the percentage contribution of each pizza type to total revenue
  2. Analyze the cumulative revenue generated over time
  3. Determine the top 3 most ordered pizza types based on revenue for each pizza category

📈 Key Insights

  • Identified best-selling pizza types and sizes
  • Found peak ordering hours
  • Analyzed revenue contribution by category
  • Tracked cumulative revenue growth over time

These insights can help improve pricing strategies, inventory planning, and marketing decisions.

🚀 How to Use This Project

  1. Import the dataset into your SQL environment
  2. Run the queries provided in the .sql file
  3. Modify or extend queries for deeper analysis

📂 Repository Structure

├── 📄 README.md ├── 📄 pizzaburg_schema.sql ├── 📄 pizzaburg_queries.sql └── 📄 dataset.csv

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors