This project provides SQL queries to analyze pizza sales data using a relational database. The queries are grouped into three levels: Basic, Intermediate, and Advanced.
- orders(
order_id,date,time) - order_details(
order_details_id,order_id,pizza_id,quantity) - pizzas(
pizza_id,pizza_type_id,size,price) - pizza_types(
pizza_type_id,name,category,ingredients)
- Retrieve the total number of orders placed
- Calculate the total revenue generated from pizza sales
- Identify the highest-priced pizza
- Identify the most common pizza size ordered
- List the top 5 most ordered pizza types along with their quantities
- Join the necessary tables to find the total quantity of each pizza category ordered
- Determine the distribution of orders by hour of the day
- Join relevant tables to find the category-wise distribution of pizzas
- Group the orders by date and calculate the average number of pizzas ordered per day
- Determine the top 3 most ordered pizza types based on revenue
- Calculate the percentage contribution of each pizza type to total revenue
- Analyze the cumulative revenue generated over time
- Determine the top 3 most ordered pizza types based on revenue for each pizza category