https://github.com/mi7773/advanced_sql_data_analytics_project
A hands-on SQL project simulating data analysis using fact and dimension tables, covering trends over time, cumulative metrics, performance breakdowns, segmentation, and reporting via SQL.
https://github.com/mi7773/advanced_sql_data_analytics_project
analytics business-analytics business-intelligence data data-analysis data-analyst data-analytics database query reporting sql sql-queries sql-query sql-server window-functions window-functions-in-sql
Last synced: 6 months ago
JSON representation
A hands-on SQL project simulating data analysis using fact and dimension tables, covering trends over time, cumulative metrics, performance breakdowns, segmentation, and reporting via SQL.
- Host: GitHub
- URL: https://github.com/mi7773/advanced_sql_data_analytics_project
- Owner: mi7773
- Created: 2025-07-12T15:21:45.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-07-12T16:04:39.000Z (7 months ago)
- Last Synced: 2025-07-12T17:53:13.366Z (7 months ago)
- Topics: analytics, business-analytics, business-intelligence, data, data-analysis, data-analyst, data-analytics, database, query, reporting, sql, sql-queries, sql-query, sql-server, window-functions, window-functions-in-sql
- Language: TSQL
- Homepage:
- Size: 829 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SQL Data Analysis Portfolio Project
This project is based on the YouTube tutorial
🎥 [SQL Data Analyst Portfolio Project | Like I Do in My Real Projects](https://www.youtube.com/watch?v=2jGhQpbzHes)
It simulates a real-world SQL data analysis scenario, covering different types of analysis and reporting.
---
## 📌 Objectives
The project demonstrates how to:
- Analyze data over time
- Perform cumulative and performance analysis
- Execute part-to-whole and segmentation analysis
- Generate actionable insights through SQL reports
---
## 🔍 Analysis Types
- 📈 **Changes Over Time**
- 📊 **Cumulative Analysis**
- 🚀 **Performance Analysis**
- 🧩 **Part-to-Whole Analysis**
- 🔍 **Data Segmentation**
---
## 📋 Final Deliverables
Two comprehensive reports saved as **SQL views**:
- **Customer Report** → `08_customer_report.sql`
- **Product Report** → `09_report_customers_view.sql`
---
## 🛠️ SQL Techniques Used
- Basic SQL: `SELECT`, `FROM`, `WHERE`, `GROUP BY`, `ORDER BY`
- Intermediate: `CASE WHEN`, `JOINS`
- Advanced: `Window Functions`, `CTEs`, `Subqueries`
---
## 📂 Files
### `scripts/` — SQL Analysis & Reporting Scripts
| File | Description |
|---------------------------------------|----------------------------------------------------|
| `00_init_database.sql` | Initializes database schema and tables |
| `01_changes_over_time_analysis_month.sql` | Analyzes sales trends on a monthly basis |
| `02_changes_over_time_analysis_year.sql` | Analyzes sales trends on a yearly basis |
| `03_cumulative_analysis.sql` | Calculates cumulative metrics over time |
| `04_performance_analysis.sql` | Evaluates sales performance across dimensions |
| `05_part_to_whole_analysis.sql` | Analyzes sales contribution by segments |
| `06_data_segmentation_cost.sql` | Segments data based on cost-related criteria |
| `07_data_segmentation_customer.sql` | Segments data by customer characteristics |
| `08_customer_report.sql` | Constructs customer report logic |
| `09_report_customers_view.sql` | Creates a view for the customer report |
| `10_product_report.sql` | Constructs and saves the product report as a view |
### `dataset/` — Source Data Tables
| File | Description |
|-------------------------------|--------------------------------------------|
| `gold.fact_sales.csv` | Fact table containing transactional sales data |
| `gold.report_customers.csv` | Dimension table for customer information |
| `gold.report_products.csv` | Dimension table for product information |
---
## 💬 Feedback
If you have suggestions for improvements or feedback, feel free to connect on [LinkedIn](https://www.linkedin.com/in/mi7773).
---
## 📎 Credits
Inspired by the tutorial:
[SQL Data Analyst Portfolio Project | Like I Do in My Real Projects](https://www.youtube.com/watch?v=2jGhQpbzHes)