SQL & EXCEL CASE STUDY

Pizza Sales Analysis

Dataset: Kaggle Pizza Sales Dataset Tools: SQL Server, Excel Role: Data Analyst

Project Overview

A SQL and Excel analysis of a pizza store's transaction data, built to answer four core business questions: how much revenue the store generates, when the busiest ordering hours and days are, which pizza categories and sizes drive the most revenue, and which items are the best and worst performers. All KPIs were calculated directly in SQL, then visualized in an interactive Excel dashboard.

Total Revenue
$817,860
Total Orders
21,350
Pizzas Sold
49,574
Avg Order Value
$38.31
Avg Pizza / Order
2.32

Note on Defensibility: Every KPI here comes directly from a SQL aggregate query against the raw transaction data, not from Excel formulas layered on top of a summary. The queries are documented in full in the repo, so each number traces back to exactly how it was calculated.

Key Performance Indicators

Five core KPIs, each calculated with a single aggregate query. Total revenue, for example:

SELECT SUM(total_price) AS Total_Revenue FROM pizza_sales;

The same pattern — aggregate function, single table was used for average order value, total pizzas sold, total orders, and average pizzas per order.

Trend Analysis

Hourly trend query:

SELECT DATEPART(HOUR, order_time) AS order_hours, COUNT(DISTINCT order_id) AS total_orders FROM pizza_sales GROUP BY DATEPART(HOUR, order_time) ORDER BY DATEPART(HOUR, order_time);

Sales Distribution

By category — Classic leads, but the margin over the rest of the field is narrow:

Category Share of Revenue
Classic 26.91%
Supreme 25.46%
Chicken 23.96%
Veggie 23.68%

By size — Large pizzas dominate revenue, while the largest sizes barely register:

Size Share of Revenue
Large 38.05%
Medium 31.65%
Small 29.06%
X-Large 1.17%
XX-Large 0.07%

Product Performance

The Classic Deluxe Pizza is the best selling item by units sold; the Brie Carre Pizza sells the least. Both were identified with the same query pattern, ranked in opposite directions:

SELECT TOP 5 pizza_name, SUM(quantity) AS Total_Pizza_Sold FROM pizza_sales GROUP BY pizza_name ORDER BY Total_Pizza_Sold DESC;
Pizza Sales Analysis Excel dashboard — KPI cards, order trends, and category breakdown

Interactive Excel dashboard built from the SQL analysis above.

Key Insights