Welcome to my SQL Portfolio!
This repository contains a collection of hands-on SQL projects developed using real-world datasets across multiple business domains. Each project focuses on solving practical business problems through data exploration, reporting, KPI analysis, and advanced SQL techniques.
Throughout these projects, I progressively apply SQL concepts ranging from basic querying and aggregations to advanced analytical techniques such as Common Table Expressions (CTEs), Window Functions, Ranking Functions, and Time-Series Analysis.
The projects are built using DuckDB and demonstrate how SQL can be used to transform raw data into meaningful business insights.
This project analyzes retail sales transactions to understand customer purchasing behavior, product performance, and revenue trends. The analysis focuses on identifying key business metrics that help improve sales performance and customer engagement.
- Analyze overall sales performance
- Identify top-selling products
- Understand customer purchasing behavior
- Evaluate revenue trends
- Discover high-value customers
- Generate business KPIs
- SELECT
- WHERE
- ORDER BY
- GROUP BY
- Aggregate Functions
- CASE Statements
- Joins
- Business KPI Reporting
This project explores hospital operations by analyzing patients, doctors, appointments, treatments, and billing information. The objective is to generate operational and financial insights that improve healthcare management.
- Analyze patient demographics
- Evaluate doctor performance
- Monitor appointment trends
- Analyze treatment effectiveness
- Track hospital revenue
- Improve operational efficiency
- Aggregate Functions
- CASE Statements
- CTEs
- Window Functions
- ROW_NUMBER()
- RANK()
- Business Reporting
This project analyzes a financial institution's loan portfolio to evaluate lending performance, portfolio quality, and credit risk. It focuses on identifying good and bad loans while monitoring key lending KPIs.
- Analyze loan applications
- Evaluate funded amounts
- Measure loan performance
- Identify good vs bad loans
- Monitor monthly lending trends
- Perform portfolio risk analysis
- Aggregate Functions
- Date Functions
- Subqueries
- CASE Statements
- Financial KPI Analysis
- Risk Analytics
This project analyzes e-commerce sales transactions to understand customer behavior, revenue generation, product performance, and sales trends. The analysis helps identify opportunities for improving customer engagement and business growth.
- Analyze order performance
- Evaluate customer purchasing behavior
- Measure revenue trends
- Identify high-performing products
- Analyze customer segmentation
- Generate business insights
- Aggregate Functions
- GROUP BY
- CASE Statements
- Joins
- Date Functions
- Business KPI Reporting
This project analyzes football tournament data to evaluate team performance, player statistics, match outcomes, scoring trends, and tournament progression. It demonstrates how SQL can be used to analyze sports data and generate meaningful insights.
- Analyze tournament performance
- Evaluate team statistics
- Analyze player performance
- Study goal scoring trends
- Monitor match outcomes
- Generate tournament insights
- Aggregate Functions
- CTEs
- Window Functions
- Ranking Functions
- Date Functions
- Sports Analytics
This project analyzes historical air quality and weather data for Milan to identify pollution trends, seasonal weather patterns, and the relationship between environmental conditions and air quality. The project combines descriptive analytics with advanced SQL techniques to generate environmental insights.
- Analyze long-term pollution trends
- Study seasonal weather patterns
- Monitor air quality indicators
- Evaluate weather and pollution relationships
- Perform time-series analysis
- Support environmental decision-making
- Aggregate Functions
- CASE Statements
- Common Table Expressions (CTEs)
- Window Functions
- ROW_NUMBER()
- RANK()
- DENSE_RANK()
- LAG()
- LEAD()
- Running Averages
- Time-Series Analysis
Across these projects, the following SQL concepts have been applied:
- SELECT
- WHERE
- ORDER BY
- GROUP BY
- HAVING
- DISTINCT
- LIMIT
- COUNT()
- SUM()
- AVG()
- MIN()
- MAX()
- INNER JOIN
- LEFT JOIN
- RIGHT JOIN
- CASE Statements
- COALESCE()
- YEAR()
- MONTH()
- DAY()
- Single CTE
- Multi-step Analysis
- Business Reporting
- ROW_NUMBER()
- RANK()
- DENSE_RANK()
- LAG()
- LEAD()
- Running Average
- Customer Segmentation
- Revenue Analysis
- Risk Analytics
- Sports Analytics
- Environmental Analytics
- Time-Series Analysis
- KPI Reporting
- Business Intelligence
- SQL
- DuckDB
- Git
- GitHub
- Visual Studio Code
SQL
│
├── 01-Retail-Sales-and-Customer-Behavior-Analysis
│
├── 02-Hospital-Management-and-Patient-Analytics
│
├── 03-Financial-Loan-Portfolio-and-Risk-Analytics
│
├── 04-E-Commerce-Sales-and-Customer-Analytics
│
├── 05-Football-World-Cup-Tournament-Analytics
│
└── 06-Milan-Air-Quality-Weather-Analytics
Through these projects, I strengthened my ability to:
- Write clean and optimized SQL queries.
- Solve real-world business problems using data.
- Build KPI-driven analytical reports.
- Perform customer, financial, healthcare, sports, and environmental analytics.
- Apply advanced SQL concepts such as CTEs and Window Functions.
- Generate meaningful business insights through data analysis.
- Structure SQL projects for professional GitHub portfolios.
This repository will continue to grow with additional SQL projects covering new industries and increasingly advanced SQL concepts, including query optimization, stored procedures, views, indexing strategies, and larger analytical datasets.