Skip to content

Dev2k30abrd/Advanced-SQL-Business-Analysis

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

📊 Advanced SQL Business Analysis Project

Project Overview

This project focuses on analyzing business performance using SQL on a generated e-commerce dataset containing 20,000 records.

The goal was to apply advanced SQL concepts to solve practical business problems related to revenue, customers, regions, and product performance.

Dataset Information

The dataset was created inside MySQL using SQL logic and includes:

  • Order details
  • Customer information
  • Product details
  • Region
  • Sales and profit values
  • Order dates

Files Included

  • database_setup.sql → Database creation and data generation
  • business_analysis.sql → Core business KPI queries
  • cte_queries.sql → Query using Common Table Expression (CTE)
  • window_functions.sql → Advanced ranking and running total queries

Key SQL Concepts Used

  • Aggregations (SUM, COUNT, AVG)
  • GROUP BY and ORDER BY
  • Common Table Expressions (CTE)
  • Window Functions
  • RANK(), DENSE_RANK(), ROW_NUMBER()
  • PARTITION BY
  • Running Totals

Business Questions Solved

  • Overall KPI summary
  • Revenue by region
  • Top customers by revenue
  • Monthly revenue trend
  • Profit margin by region
  • Customer ranking comparison
  • Top customers within each region
  • Running total revenue

Project Outcome

This project strengthened my understanding of writing structured analytical SQL queries and applying advanced SQL techniques to business scenarios.

About

Advanced SQL project using KPI analysis, CTE and window functions on generated e-commerce dataset

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors