Skip to content

About Advanced SQL project analyzing e-commerce sales using joins, CTEs, and window functions. Includes sample data (CSV) and queries with business insights.

Notifications You must be signed in to change notification settings

Siva9100623079/SQL-Ecommerce-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

📊 SQL Project – E-commerce Sales Analysis

📅 Date: [August, 2025]


📌 Project Overview

This project analyzes sales data from a small e-commerce platform using SQL.
The goal is to demonstrate advanced SQL skills such as joins, aggregations, CTEs, and window functions to extract meaningful business insights.


📂 Datasets

  • Customers_data.csv → Customer details (ID, name, city, signup date)
  • Products_data.csv → Product details (ID, name, category, price)
  • Orders_data.csv → Orders placed by customers (ID, product, quantity, date)

🛠️ Skills Demonstrated

  • SQL Joins (INNER JOIN, aggregations)
  • Common Table Expressions (CTEs)
  • Window Functions (RANK, Running Totals)
  • Business-Oriented Query Writing
  • Data Analysis & Reporting

🔍 Example Business Questions Answered

  1. Who are the top spending customers across all cities?
  2. Which cities contribute the most to total revenue
  3. What are the daily sales trends and cumulative growth over time?
  4. Which customers shop across multiple product categories?
  5. What are the most popular products in each city?
  6. Which product categories drive the most revenue? (extra since you have more categories now)

📊 Key Insights

  • 🏆 Top Customers: Ava Sharma, Ananya Iyer, and Rahul Mehta are the highest spenders.
  • 🌆 Top Cities: Mumbai and Delhi generate the most revenue overall.
  • 📈 Sales Trends: Daily sales are steady with cumulative revenue showing consistent growth.
  • 🛍️ Multi-Category Buyers: 8 customers shop across multiple categories, led by Ava Sharma.
  • 🏙️ Popular Products by City: Laptops dominate Mumbai, Smartphones lead Delhi, T-Shirts top Bangalore.
  • 📦 Category Revenue: Electronics contribute ~55% of revenue, making them the main driver.

📁 Files in this Repository

  • Customers_data.csv
  • Products_data.csv
  • Orders_data.csv
  • SQL_queries.sql
  • README.md (this file)

🚀 How to Use

  1. Import the CSVs into your SQL database (PostgreSQL, MySQL, or SQLite).
  2. Run queries from SQL_queries.sql.
  3. Explore insights or modify queries to extend the analysis.

Author

Siva Satya Varaprasad Vasamsetti

About

About Advanced SQL project analyzing e-commerce sales using joins, CTEs, and window functions. Includes sample data (CSV) and queries with business insights.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published