Skip to content

Ruddraw/pizza_sales_SQL

Repository files navigation

pizza_sales_SQL

This project is a part of my learning journey to master SQL. The objective was to analyze pizza sales data and answer various questions ranging from basic to advanced complexity. The dataset and questions are sourced from this GitHub repository.

Project Overview

The project is divided into three sections:

  1. Basic Questions: 5 questions that cover fundamental SQL queries.
  2. Intermediate Questions: 5 questions that delve into more complex SQL operations.
  3. Advanced Questions: 3 questions that require advanced SQL techniques.

Learning Goals

  • Understand and practice basic SQL operations.
  • Learn to write more complex SQL queries.
  • Optimize SQL queries for better performance.
  • Apply advanced SQL techniques to solve intricate problems.

How I Worked on the Project

  1. Dataset and Questions: I used the dataset and questions from Ayushi0214/pizza-sales---SQL.
  2. Writing SQL Queries: I initially wrote all the SQL queries myself to answer the provided questions.
  3. Optimization: I then optimized these queries with the assistance of ChatGPT, ensuring they are efficient and clean.

Queries Overview

Basic Questions

  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 Questions

  1. Join the necessary tables to find the total quantity of each pizza category ordered.
  2. Determine the distribution of orders by hour of the day.
  3. Join relevant tables to find the category-wise distribution of pizzas.
  4. Group the 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 Questions

  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.

Conclusion

This project was an excellent opportunity for me to practice and enhance my SQL skills. The process of writing and optimizing queries has deepened my understanding of SQL and prepared me for more advanced data analysis tasks.

Feel free to explore the queries and provide any feedback or suggestions!

README generated with ChatGPT

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published