Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions FUNDING.yml

This file was deleted.

87 changes: 55 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,70 @@
# sql-data-analytics-project
A comprehensive collection of SQL scripts for data exploration, analytics, and reporting. These scripts cover various analyses such as database exploration, measures and metrics, time-based trends, cumulative analytics, segmentation, and more.
This repository contains SQL queries designed to help data analysts and BI professionals quickly explore, segment, and analyze data within a relational database. Each script focuses on a specific analytical theme and demonstrates best practices for SQL queries.
# 📊 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).

---

## ☕ Stay Connected
## 🗂️ 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)

Let's stay in touch! Feel free to connect with me on the following platforms:
---

[![YouTube](https://img.shields.io/badge/YouTube-red?style=for-the-badge&logo=youtube&logoColor=white)](http://bit.ly/3GiCVUE)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://linkedin.com/in/baraa-khatib-salkini)
[![Website](https://img.shields.io/badge/Website-000000?style=for-the-badge&logo=google-chrome&logoColor=white)](https://www.datawithbaraa.com)
[![Newsletter](https://img.shields.io/badge/Newsletter-FF5722?style=for-the-badge&logo=substack&logoColor=white)](https://bit.ly/BaraaNewsletter)
[![PayPal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/baraasalkini)
[![Join](https://img.shields.io/badge/Join-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@datawithbaraa)
## 🧠 Core Concept: Dimensions & Measures

All Courses and their materials are completely free, and all I ask is your support through subscribing, liking, and commenting on my channel. Your engagement means the world to me and It help the channel!
- **SQL Full Course:** [Course Link](https://youtu.be/SSKVgrwhzus) | [Download Materials](https://www.datawithbaraa.com/sql-introduction/sql-ultimate-course/) | [GIT Repo](https://github.com/DataWithBaraa/sql-ultimate-course)
- **Tableau Full Course:** [Course Link](https://www.youtube.com/watch?v=K3pXnbniUcM) | [Download Materials](https://www.datawithbaraa.com/tableau/tableau-thank-you/) | [Public](https://public.tableau.com/app/profile/baraa.salkini/vizzes)
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).

- ✅ **SQL Data Warehouse Project:** [Course Link](https://youtu.be/SSKVgrwhzus) | [Download Materials](https://www.datawithbaraa.com/sql-introduction/advanced-sql-project/) | [GIT Repo](https://github.com/DataWithBaraa/sql-data-warehouse-project)
- ✅ **SQL Exploratory Data Analysis Project:** [Course Link](https://youtu.be/SSKVgrwhzus) | [Download Materials](https://www.datawithbaraa.com/sql-introduction/advanced-sql-analytics-project/) | [GIT Repo](https://github.com/DataWithBaraa/sql-data-analytics-project)
- ✅ **SQL Advanced Data Analysis Project:** [Course Link](https://youtu.be/SSKVgrwhzus) | [Download Materials](https://www.datawithbaraa.com/sql-introduction/advanced-sql-analytics-project/) | [GIT Repo](https://github.com/DataWithBaraa/sql-data-analytics-project)

- ✅ **Tableau Sales Project:** [Course Link](https://www.youtube.com/watch?v=dahrmqT5GD4) | [Download Materials](https://datawithbaraa.substack.com/p/access-to-course-materials) | [Public](https://public.tableau.com/app/profile/baraa.salkini/vizzes)
- ✅ **Tableau HR Project:** [Course Link](https://www.youtube.com/watch?v=UcGF09Awm4Y) | [Download Materials](https://datawithbaraa.substack.com/p/access-to-course-materials) | [Public](https://public.tableau.com/app/profile/baraa.salkini/vizzes)
- ✅ **ChatGPT:** [Course Link](https://www.youtube.com/watch?v=LJLNfei4i-c) | [Download Materials](https://datawithbaraa.substack.com/p/access-to-course-materials)
This classification is the foundation of almost every analytical query.

---

## 🛡️ License
## 🛣️ Project Roadmap

The project follows **six structured steps** for analysis:

This project is licensed under the [MIT License](LICENSE). You are free to use, modify, and share this project with proper attribution.
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).

## 🌟 About Me
---

Hi there! I'm **Baraa Khatib Salkini**, also known as **Data With Baraa**. I’m an IT professional and passionate YouTuber on a mission to share knowledge and make working with data enjoyable and engaging!
## 📝 Example Queries

Let's stay in touch! Feel free to connect with me on the following platforms:
Here are some representative queries from the project:

[![YouTube](https://img.shields.io/badge/YouTube-red?style=for-the-badge&logo=youtube&logoColor=white)](http://bit.ly/3GiCVUE)
[![LinkedIn](https://img.shields.io/badge/LinkedIn-0077B5?style=for-the-badge&logo=linkedin&logoColor=white)](https://linkedin.com/in/baraa-khatib-salkini)
[![Website](https://img.shields.io/badge/Website-000000?style=for-the-badge&logo=google-chrome&logoColor=white)](https://www.datawithbaraa.com)
[![Newsletter](https://img.shields.io/badge/Newsletter-FF5722?style=for-the-badge&logo=substack&logoColor=white)](https://bit.ly/BaraaNewsletter)
[![PayPal](https://img.shields.io/badge/PayPal-00457C?style=for-the-badge&logo=paypal&logoColor=white)](https://paypal.me/baraasalkini)
[![Join](https://img.shields.io/badge/Join-FF0000?style=for-the-badge&logo=youtube&logoColor=white)](https://www.youtube.com/@datawithbaraa)
- 📑 **List all tables in the database**
```sql
SELECT * FROM information_schema.tables;
Binary file removed docs/Project Roadmap.pdf
Binary file not shown.
Binary file removed docs/Project Roadmap.png
Binary file not shown.
Binary file removed docs/Project_Notes_Sketches.pdf
Binary file not shown.