0% found this document useful (0 votes)
52 views5 pages

SQL Queries MOD Pizza Report

The document outlines SQL queries for analyzing MOD Pizza sales, including calculations for total revenue, average order value, total pizzas sold, total orders, and average pizzas per order. It also specifies requirements for visualizing data through charts, such as daily and monthly trends for total orders and a pie chart for sales distribution by pizza category. These analyses aim to provide insights into sales performance and customer ordering patterns.

Uploaded by

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

SQL Queries MOD Pizza Report

The document outlines SQL queries for analyzing MOD Pizza sales, including calculations for total revenue, average order value, total pizzas sold, total orders, and average pizzas per order. It also specifies requirements for visualizing data through charts, such as daily and monthly trends for total orders and a pie chart for sales distribution by pizza category. These analyses aim to provide insights into sales performance and customer ordering patterns.

Uploaded by

jaichandc1
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd

MOD PIZZA SALES SQL QURIES REPORT DOCUMENT

1. KPI’s for Problem Statement(Date: 9/10/2023 @ 9:00 AM)


Select * from MOD_Pizza_Sales

--- [Link] Revenue: The sum of the total price of all pizza orders.

Select Sum(total_price) as Total_Revenue from MOD_Pizza_Sales

--- 2. Average Order Value: The average amount spent per order,
--calculated by dividing the total revenue by the total number of
orders.

Select Sum(Total_price)/ Count(Distinct(Order_id)) as


Average_Order_Value from MOD_Pizza_Sales
MOD PIZZA SALES SQL QURIES REPORT DOCUMENT

---3. Total Pizzas Sold: The sum of the quantities of all pizzas sold.

Select Sum(Quantity) as Total_Pizzas_Sold from MOD_Pizza_Sales

---- 4. Total Orders: The total number of orders placed.

Select Count(Distinct(Order_id)) as Total_Orders from MOD_Pizza_Sales

--5. Average Pizzas Per Order: The average number of pizzas sold per
order,
--calculated by dividing the total number of pizzas sold by the total
number of orders
Select CAST(CAST(Sum(quantity) as Decimal(10,2))/
CAST(Count(Distinct(order_id)) as Decimal(10,2)) as
Decimal(10,2)) as Average_Pizzas_Per_Order
from MOD_Pizza_Sales
MOD PIZZA SALES SQL QURIES REPORT DOCUMENT

MOD Pizza - CHARTS REQUIREMENT

[Link] Trend for Total Orders:


Create a bar chart that displays the daily trend of total orders
over a specific time period. This chart will help us identify any
patterns or fluctuations in order volumes on a daily basis.

[Link] Trend for Total Orders:


-- Create a bar chart that displays the daily trend of total orders over a
specific time period.
--This chart will help us identify any patterns or fluctuations in order volumes
on a daily basis.

Select * from MOD_Pizza_Sales

Select DATENAME(DW, order_date) as Order_Day, Count(Distinct Order_ID) as


Total_Order from MOD_Sales
Group by DATENAME(DW, order_date)
Order by Total_Order Desc
MOD PIZZA SALES SQL QURIES REPORT DOCUMENT

[Link] Trend for Total Orders:


Create a line chart that illustrates the hourly trend of total
orders throughout the day. This chart will allow us to identify
peak hours or periods of high order activity.

[Link] Trend for Total Orders:


--Create a line chart that illustrates the hourly trend of total orders
throughout the day.
--This chart will allow us to identify peak hours or periods of high order
activity.

Select * from MOD_Sales

Select DATENAME(Month, order_date) as Order_Month, Count(Distinct Order_ID) as


Total_Order from MOD_Sales
Group by DATENAME(Month, order_date)
Order by Total_Order Desc
MOD PIZZA SALES SQL QURIES REPORT DOCUMENT
[Link] of Sales by Pizza Category:
Create a pie chart that shows the distribution of sales across
different pizza categories. This chart will provide insights into
the popularity of various pizza categories and their contribution
to overall sales.
[Link] of Sales by Pizza Category:
Create a pie chart that shows the distribution of sales across different pizza
categories.
This chart will provide insights into the popularity of various pizza categories
and their contribution to overall sales.

Select * from MOD_Sales

Select pizza_category,
Cast(Sum(total_price) as Decimal (10,2))as Total_Sales,
CAST(sum(total_price) *100/(Select Sum(total_price) from MOD_Sales)as
Decimal(10,2)) As PCT_Sales
from MOD_Sales
Group by pizza_category

You might also like