Skip to content

haaaarrrsh4ever/Zepto_SQL_Data_Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛒 Zepto Inventory Analysis using SQL

A complete SQL data analysis project built on a real-world e-commerce inventory dataset inspired by Zepto's product catalog. This project demonstrates practical SQL skills used in retail and e-commerce analytics, including database creation, data cleaning, exploratory data analysis (EDA), and business insight generation.

This repository was created as part of my SQL portfolio to showcase problem-solving, analytical thinking, and PostgreSQL skills commonly expected from Data Analysts and SQL Developers.


📌 Project Objective

The objective of this project is to simulate the daily responsibilities of a Data Analyst by working with a real inventory dataset.

The project covers:

  • Designing a PostgreSQL database
  • Importing raw CSV data
  • Exploring and validating the dataset
  • Cleaning inconsistent records
  • Writing analytical SQL queries
  • Generating business insights for inventory and pricing decisions

🗂 Dataset Information

The dataset contains inventory information from an online grocery and quick-commerce platform.

Each record represents a unique SKU (Stock Keeping Unit).

Columns

Column Description
sku_id Unique Product ID
name Product Name
category Product Category
mrp Maximum Retail Price
discountPercent Discount Percentage
discountedSellingPrice Final Selling Price
availableQuantity Available Inventory
weightInGms Product Weight
outOfStock Stock Availability
quantity Package Quantity

🛠 Tools & Technologies

  • PostgreSQL
  • pgAdmin 4
  • SQL
  • CSV Dataset
  • Git
  • GitHub

⚙ Database Design

A PostgreSQL table was created with appropriate data types to efficiently store inventory information.

Key considerations included:

  • Primary Key creation
  • Numeric data types for pricing
  • Boolean values for stock status
  • Integer values for inventory and weight

📥 Data Import

The dataset was imported into PostgreSQL using pgAdmin.

During import:

  • CSV encoding issues were resolved by converting the file to UTF-8.
  • Column mapping was verified before loading.
  • Data integrity was validated after import.

🔍 Exploratory Data Analysis (EDA)

Several exploratory queries were performed to understand the dataset.

These included:

  • Total number of products
  • Category distribution
  • Distinct product categories
  • Duplicate product names
  • Null value detection
  • Stock availability analysis
  • Product pricing overview

🧹 Data Cleaning

To improve data quality, the following cleaning steps were performed:

  • Removed invalid rows with zero pricing
  • Standardized price values
  • Converted prices from paise to rupees
  • Verified missing values
  • Checked for inconsistent records

📊 Business Analysis

The project answers several practical business questions using SQL.

Some of the analyses include:

  • Top products offering the highest discounts
  • High-value products currently out of stock
  • Estimated inventory value by category
  • Premium products with low discounts
  • Categories providing the highest average discounts
  • Best value products based on price per gram
  • Product segmentation by weight
  • Total inventory weight by category

📈 SQL Concepts Used

This project demonstrates practical usage of:

  • SELECT
  • WHERE
  • ORDER BY
  • GROUP BY
  • HAVING
  • DISTINCT
  • LIMIT
  • CASE WHEN
  • Aggregate Functions
  • Arithmetic Operations
  • Common Filtering Techniques
  • Data Cleaning Queries

📂 Repository Structure

├── dataset/
│   └── zepto_inventory.csv
│
├── sql/
│   └── zepto_inventory_analysis.sql
│
├── screenshots/
│   ├── query_results/
│   └── database_schema/
│
└── README.md

🎯 Key Skills Demonstrated

  • SQL Query Writing
  • Data Cleaning
  • Exploratory Data Analysis
  • Inventory Analysis
  • Retail Analytics
  • Business Intelligence
  • PostgreSQL
  • Database Design
  • Analytical Thinking

🚀 Learning Outcomes

Through this project I gained hands-on experience in:

  • Working with real-world datasets
  • Cleaning and validating raw data
  • Writing optimized SQL queries
  • Performing business-oriented analysis
  • Organizing SQL projects for GitHub portfolios

📌 Future Improvements

Possible future enhancements include:

  • SQL Views
  • Stored Procedures
  • Window Functions
  • Index Optimization
  • Dashboard creation using Power BI
  • PostgreSQL Performance Optimization

📚 Dataset Source

The dataset is based on publicly available Zepto inventory data originally shared on Kaggle.


👨‍💻 Author

Harsh Yadav

MCA Graduate | Aspiring Database Administrator (DBA) | SQL & PostgreSQL Enthusiast

Skills

  • SQL
  • PostgreSQL
  • MySQL
  • Python
  • Excel
  • Database Design

⭐ If you found this project helpful, feel free to star the repository.

Releases

No releases published

Packages

 
 
 

Contributors