Thanks to visit codestin.com
Credit goes to github.com

Skip to content

This repository contains a collection of SQL scripts demonstrating various analytical techniques, such as changes over time, cumulative, performance, data segmentation, part-to-whole analysis.

License

Notifications You must be signed in to change notification settings

hemanthreddy04/sql-data-analytics-project

Β 
Β 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

40 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ“Š SQL Data Analytics Project

A comprehensive SQL Exploratory Data Analysis (EDA) project that demonstrates how to explore, analyze, and derive insights from relational databases.
This project is designed for data analysts, BI professionals, and learners who want hands-on SQL practice.

The repository contains structured SQL scripts that cover:

  • πŸ” Database exploration
  • πŸ“‘ Dimensions & attributes analysis
  • πŸ“† Date/time-based exploration
  • πŸ“ˆ Measures & metrics calculations
  • βš–οΈ Magnitude comparisons across categories
  • πŸ† Ranking & performance analysis

🎯 Project Overview

This project is inspired by practical SQL workflows where data exploration leads to actionable insights.

It demonstrates three main types of SQL analytics projects:

  1. πŸ—οΈ Data Warehousing – Structuring and organizing raw data.
  2. πŸ”Ž Exploratory Data Analysis (EDA) – Asking questions and uncovering patterns. (Focus of this repo)
  3. πŸ“Š Advanced Analytics – Business-driven queries (trends, comparisons, segmentation, reports).

πŸ—‚οΈ Dataset & Setup

To run this project, you can set up the database in SQL Server in three ways:

  1. ⚑ Executing Scripts – Run init_database.sql to create schema & tables.
  2. πŸ“‚ Importing CSVs – Use SQL Server’s Import Flat File wizard.
  3. πŸ’Ύ Restoring Backup – Use the provided .bak file to restore the database.

Tables used:

  • πŸ‘€ DimCustomer (customer details, demographics, location)
  • πŸ“¦ DimProduct (product details, categories, cost)
  • πŸ›’ FactSales (sales transactions, quantities, revenue, dates)

🧠 Core Concept: Dimensions & Measures

Understanding the dataset is easier if you separate fields into Dimensions vs Measures:

  • 🧩 Dimensions β†’ Descriptive attributes (Country, Category, Product, Dates, Gender).
  • πŸ”’ Measures β†’ Numeric values that can be aggregated (Sales Amount, Quantity, Cost, Age).

This classification is the foundation of almost every analytical query.


πŸ›£οΈ Project Roadmap

The project follows six structured steps for analysis:

  1. πŸ” Database Exploration β†’ Inspect tables, columns, metadata.
  2. 🧩 Dimensions Exploration β†’ Explore unique values (countries, categories, products).
  3. πŸ“† Date Exploration β†’ Identify time ranges (first/last orders, customer age).
  4. πŸ“Š Measures Exploration β†’ Aggregate metrics (sales, quantities, averages).
  5. βš–οΈ Magnitude Analysis β†’ Compare measures across dimensions (sales by category, revenue by country).
  6. πŸ† Ranking Analysis β†’ Identify top/bottom performers (best products, loyal customers, worst sellers).

πŸ“ Example Queries

Here are some representative queries from the project:

  • πŸ“‘ List all tables in the database
SELECT * FROM information_schema.tables;

About

This repository contains a collection of SQL scripts demonstrating various analytical techniques, such as changes over time, cumulative, performance, data segmentation, part-to-whole analysis.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TSQL 100.0%