# swaapnaa/sql-projects architecture

> Architecture diagram of the GitHub repository swaapnaa/sql-projects, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-10-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/swaapnaa/sql-projects
- Repository: https://github.com/swaapnaa/sql-projects

## Overview

##### Project type and purpose
- This is a set of SQL-based data-analysis projects, each ingesting CSV data into a relational database (SQL Server or MySQL), performing cleaning/ETL, running analytical queries, and delivering tabular or visual insights for leadership.

##### File structure
- Top level:
- “Analyzing Employee Trends/” – contains a CSV of HR data and a .sql script for analysis
- “Exploring Trends in the Automotive Industry/” – CSV + .sql for car sales analytics
- “call center data cleaning/” – CSV + .sql for call center data cleansing and summary
- No application code (no “src” or “backend” folders)—scripts only.
- No configuration or build pipelines—each .sql file is standalone.

##### README for additional insights
- Each subproject follows the same flow: import CSV → data validation/cleaning → SQL analytics (joins, aggregates, window functions) → present results.
- The README outlines tasks performed, SQL techniques, and usage instructions.

##### Elements
- Clear labels for: “Raw CSV,” “ETL Scripts,” “Database Engine,” “Analytical Queries,” “Report Output,” “Business Consumers”
- Processes (rectangles in green)

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Raw Data Sources
    subgraph "Raw CSV Files"
        A1["Analyzing Employee Trends.csv"]:::data
        A2["Exploring Trends in the Automotive Industry.csv"]:::data
        A3["Call Center.csv"]:::data
    end

    %% ETL and Data Cleaning Processes
    subgraph "ETL & Data Cleaning"
        B1["Analyzing Employee Trends.sql"]:::process
        B2["Exploring Trends in the AutomotiveIndustry.sql"]:::process
        B3["Call_centerSQL.sql"]:::process
    end

    %% Central Database Engine
    C["SQL Server/MySQL Engine"]:::storage

    %% Analytical Query Modules
    subgraph "Analytical Queries"
        D1["Analyzing Employee Trends.sql"]:::process
        D2["Exploring Trends in the AutomotiveIndustry.sql"]:::process
        D3["Call_centerSQL.sql"]:::process
    end

    %% Reporting and Visualization
    E["Report Output & Usage Guidance (README.md)"]:::report

    %% Business Consumers
    F["Business Stakeholders"]:::consumer

    %% Data Flow
    A1 -->|import| B1 -->|load into| C
    A2 -->|import| B2 -->|load into| C
    A3 -->|import| B3 -->|load into| C

    C -->|query| D1 -->|generate results| E
    C -->|query| D2 -->|generate results| E
    C -->|query| D3 -->|generate results| E

    E -->|delivers insights| F

    %% Click Events
    click A1 "https://github.com/swaapnaa/sql-projects/blob/main/Analyzing Employee Trends/Analyzing Employee Trends.csv"
    click A2 "https://github.com/swaapnaa/sql-projects/blob/main/Exploring Trends in the Automotive Industry/Exploring Trends in the Automotive Industry.csv"
    click A3 "https://github.com/swaapnaa/sql-projects/blob/main/call center data cleaning/Call Center.csv"
    click B1 "https://github.com/swaapnaa/sql-projects/blob/main/Analyzing Employee Trends/Analyzing Employee Trends.sql"
    click B2 "https://github.com/swaapnaa/sql-projects/blob/main/Exploring Trends in the Automotive Industry/Exploring Trends in the AutomotiveIndustry.sql"
    click B3 "https://github.com/swaapnaa/sql-projects/blob/main/call center data cleaning/Call_centerSQL.sql"
    click D1 "https://github.com/swaapnaa/sql-projects/blob/main/Analyzing Employee Trends/Analyzing Employee Trends.sql"
    click D2 "https://github.com/swaapnaa/sql-projects/blob/main/Exploring Trends in the Automotive Industry/Exploring Trends in the AutomotiveIndustry.sql"
    click D3 "https://github.com/swaapnaa/sql-projects/blob/main/call center data cleaning/Call_centerSQL.sql"
    click E "https://github.com/swaapnaa/sql-projects/blob/main/README.md"

    %% Styling
    classDef data fill:#cce5ff,stroke:#1f78b4,color:#1f78b4;
    classDef process fill:#d4edda,stroke:#2e7d32,color:#2e7d32;
    classDef storage fill:#ffe5b4,stroke:#f57c00,color:#e65100;
    classDef report fill:#f8d7da,stroke:#c62828,color:#c62828;
    classDef consumer fill:#dddddd,stroke:#555555,color:#555555;
```
