Skip to content

Latest commit

ย 

History

4 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ—๏ธ SQL Data Warehouse & Analytics

Transform raw ERP & CRM data into analytics-ready business intelligence.

A portfolio project demonstrating data warehousing, ETL, data quality, dimensional modeling, and SQL-based business analysis.


๐ŸŽฏ Business Problem

Raw operational data is often distributed across different systems, contains quality issues, and is difficult to use directly for reporting.

This project builds a structured analytical warehouse that answers business questions around:

  • ๐Ÿ‘ฅ Customer behavior
  • ๐Ÿ“ฆ Product performance
  • ๐Ÿ’ฐ Sales performance
  • ๐Ÿ“ˆ Sales trends
  • ๐Ÿ”„ Data quality and transformation

The objective is to move from raw source data โ†’ trusted analytical data โ†’ business insight.


๐Ÿ›๏ธ Data Architecture

This project follows a Medallion Architecture with three layers:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚       SOURCE SYSTEMS        โ”‚
โ”‚      ERP + CRM CSVs         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚       ๐Ÿฅ‰ BRONZE LAYER       โ”‚
โ”‚                             โ”‚
โ”‚ Raw data                   โ”‚
โ”‚ Minimal transformation      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚       ๐Ÿฅˆ SILVER LAYER       โ”‚
โ”‚                             โ”‚
โ”‚ Cleaning                    โ”‚
โ”‚ Standardization             โ”‚
โ”‚ Deduplication               โ”‚
โ”‚ Data quality checks         โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚         ๐Ÿฅ‡ GOLD LAYER       โ”‚
โ”‚                             โ”‚
โ”‚ Business-ready data         โ”‚
โ”‚ Star schema                 โ”‚
โ”‚ Fact + Dimension tables      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
               โ”‚
               โ–ผ
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚       ๐Ÿ“Š ANALYTICS          โ”‚
โ”‚                             โ”‚
โ”‚ SQL Reports & Insights      โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

The repository includes architecture documentation under docs/, including data architecture, data flow, ETL, data models, and the data catalog. ๎ˆ€filecite๎ˆ‚turn11file0๎ˆ‚L2-L2๎ˆ


๐Ÿ”„ ETL Pipeline

CSV SOURCE FILES
      โ”‚
      โ–ผ
   EXTRACT
      โ”‚
      โ–ผ
๐Ÿฅ‰ BRONZE
      โ”‚
      โ”‚ Clean + Validate
      โ–ผ
๐Ÿฅˆ SILVER
      โ”‚
      โ”‚ Model + Integrate
      โ–ผ
๐Ÿฅ‡ GOLD
      โ”‚
      โ–ผ
SQL ANALYTICS
      โ”‚
      โ–ผ
BUSINESS INSIGHTS

Bronze โ€” Raw

Source data is loaded with minimal changes so the original information remains available for downstream processing.

Silver โ€” Cleaned

Data quality problems are addressed through cleaning, standardization, normalization, and validation.

Gold โ€” Business Ready

Cleaned data is transformed into analytical models designed for efficient reporting and business analysis.


โญ Data Modeling

The Gold layer follows a star-schema approach:

                 โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                 โ”‚ Dim Customer โ”‚
                 โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
                        โ”‚
โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ–ผโ”€โ”€โ”€โ”€โ”€โ”   โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚ Dim Product  โ”œโ”€โ”€โ–บโ”‚Fact Salesโ”‚โ—„โ”€โ”€โ”ค Dim Date    โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”ฌโ”€โ”€โ”€โ”€โ”€โ”˜   โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                        โ”‚
                        โ–ผ
                 Sales Analytics

This separates descriptive dimensions from measurable business events and makes analytical queries easier to understand and maintain.


๐Ÿงน Data Quality

The transformation layer focuses on common real-world data problems such as:

  • Missing or invalid values
  • Inconsistent formats
  • Duplicate records
  • Invalid dates
  • Incorrect or inconsistent categorical values
  • Data type inconsistencies
  • Source-system integration issues

The goal is not simply to load data, but to create a trusted analytical layer.


๐Ÿ“Š Analytics & Business Questions

The analytical layer is designed to answer questions such as:

๐Ÿ‘ฅ Customer Analysis

  • Who are the highest-value customers?
  • How does customer activity change over time?
  • Which customer groups contribute the most sales?

๐Ÿ“ฆ Product Analysis

  • Which products generate the most revenue?
  • Which categories perform best?
  • Which products may require attention?

๐Ÿ’ฐ Sales Analysis

  • What are the overall sales trends?
  • How does performance change over time?
  • Which products and customers drive revenue?

๐Ÿง  SQL Skills Demonstrated

This project is designed to demonstrate practical analytical SQL, including:

JOINs
GROUP BY
CASE expressions
CTEs
Subqueries
Aggregations
Window Functions
ROW_NUMBER()
RANK()
LAG()
LEAD()
SUM() OVER()
AVG() OVER()
Date / time analysis
Data quality validation

The emphasis is on using SQL to answer business questions, not simply writing syntactically correct queries.


๐Ÿ“‚ Repository Structure

data-warehouse-project/
โ”‚
โ”œโ”€โ”€ datasets/
โ”‚   โ””โ”€โ”€ ERP + CRM source CSVs
โ”‚
โ”œโ”€โ”€ docs/
โ”‚   โ”œโ”€โ”€ data_architecture.drawio
โ”‚   โ”œโ”€โ”€ data_flow.drawio
โ”‚   โ”œโ”€โ”€ data_models.drawio
โ”‚   โ”œโ”€โ”€ etl.drawio
โ”‚   โ”œโ”€โ”€ data_catalog.md
โ”‚   โ”œโ”€โ”€ naming-conventions.md
โ”‚   โ””โ”€โ”€ requirements.md
โ”‚
โ”œโ”€โ”€ scripts/
โ”‚   โ”œโ”€โ”€ bronze/
โ”‚   โ”œโ”€โ”€ silver/
โ”‚   โ””โ”€โ”€ gold/
โ”‚
โ”œโ”€โ”€ tests/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ LICENSE
โ””โ”€โ”€ requirements.txt

๐Ÿ› ๏ธ Tech Stack

Technology Purpose
SQL Server Data warehouse database
T-SQL ETL and analytics
SSMS Database development and management
Draw.io Architecture and data-model diagrams
Git/GitHub Version control and documentation

๐Ÿš€ Getting Started

Prerequisites

  • SQL Server Express or another compatible SQL Server installation
  • SQL Server Management Studio (SSMS)
  • Git

Workflow

1. Clone repository
       โ†“
2. Load source CSV files
       โ†“
3. Execute Bronze scripts
       โ†“
4. Run Silver transformations
       โ†“
5. Build Gold analytical models
       โ†“
6. Run analytical SQL scripts
       โ†“
7. Explore business insights

๐Ÿ“ˆ Why This Project Matters for Analytics

A strong analyst needs to understand not only how to query data, but also where the data comes from and how trustworthy it is.

This project demonstrates the complete path:

Source Systems โ†’ ETL โ†’ Data Quality โ†’ Data Modeling โ†’ SQL โ†’ Business Insights

That makes the project relevant to both Data Analyst and BI / Analytics roles.


๐Ÿ”ฎ Future Improvements

  • Connect the Gold layer to Power BI
  • Add automated data-quality reporting
  • Add incremental ETL processing
  • Add more advanced customer analytics
  • Add scheduled pipeline execution
  • Add automated testing for transformation rules
  • Add an executive BI dashboard

๐Ÿ‘จโ€๐Ÿ’ป Author

M Naveenkumar
CSE Student | Aspiring Data Analyst | SQL | Python | Business Intelligence

๐Ÿ”— GitHub

๐Ÿ”— LinkedIn


๐Ÿ—„๏ธ Raw Data โ†’ Clean Data โ†’ Analytics โ†’ Business Decisions ๐Ÿ“Š

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages