Skip to content

karanv07/Pizza-Sales-Analysis-SQL

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

8 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Pizza-Sales-Analysis-SQL

πŸ• Pizza Sales Analysis (SQL)

πŸ“Œ Overview

SQL project analyzing pizza sales to understand revenue, demand patterns, popular sizes, and top-performing categories.

πŸ›  Tools / SQL

  • PostgreSQL
  • Joins, GROUP BY, aggregates
  • Date/time analysis (EXTRACT)
  • Window functions (RANK, cumulative revenue)

πŸ“Š Tables

  • pizzas
  • pizza_type
  • orders
  • order_details

βœ… Analysis Included

  • Total orders & total revenue
  • Highest priced pizza
  • Most common size (by quantity)
  • Top 5 pizza types by quantity
  • Category-wise quantity distribution
  • Orders by hour (peak time)
  • Avg pizzas ordered per day
  • Top 3 pizzas by revenue
  • % revenue contribution by category
  • Cumulative revenue trend
  • Top 3 pizzas by revenue per category (ranking)

πŸš€ How to Load Data (psql)

If you upload CSVs in data/, run: \copy pizza_type FROM 'data/pizza_types.csv' WITH (FORMAT csv, HEADER true); \copy pizzas FROM 'data/pizzas.csv' WITH (FORMAT csv, HEADER true); \copy orders FROM 'data/orders.csv' WITH (FORMAT csv, HEADER true); \copy order_details FROM 'data/order_details.csv' WITH (FORMAT csv, HEADER true);

πŸ“Œ Notes

  • Data loading uses \copy to keep the project portable (no personal file paths).
  • Dataset upload is optional for portfolio; queries + README are enough.

πŸ‘¨β€πŸ’» Created by: Karan Vaishnav

About

Pizza sales analysis using SQL (PostgreSQL): revenue, demand patterns, and category performance.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors