0% found this document useful (0 votes)
16 views2 pages

Pizza Sales SQL Queries Project

Uploaded by

yanshsondhiya7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
16 views2 pages

Pizza Sales SQL Queries Project

Uploaded by

yanshsondhiya7
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Pizza Sales Analysis - SQL Queries and Insights

1. Total Orders by Day of the Week

SELECT DAYNAME(order_date) AS day_of_week, COUNT(*) AS total_orders

FROM pizza_sales

GROUP BY DAYNAME(order_date)

ORDER BY total_orders DESC;

2. Total Revenue by Month

SELECT MONTHNAME(order_date) AS month, SUM(order_amount) AS total_revenue

FROM pizza_sales

GROUP BY MONTHNAME(order_date)

ORDER BY MONTH(order_date);

3. Best-Selling Pizza by Quantity

SELECT pizza_type, SUM(quantity) AS total_sold

FROM pizza_sales

GROUP BY pizza_type

ORDER BY total_sold DESC

LIMIT 1;

4. Average Order Value

SELECT AVG(order_amount) AS average_order_value

FROM pizza_sales;
5. Orders for Each Pizza Size

SELECT pizza_size, COUNT(*) AS total_orders

FROM pizza_sales

GROUP BY pizza_size;

6. Customer Segmentation by Location

SELECT customer_city, COUNT(*) AS total_customers

FROM customers

GROUP BY customer_city

ORDER BY total_customers DESC;

7. Peak Order Hours

SELECT HOUR(order_time) AS order_hour, COUNT(*) AS total_orders

FROM pizza_sales

GROUP BY HOUR(order_time)

ORDER BY total_orders DESC;

You might also like