Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

105 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SQL Portfolio Projects

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.


Projects

1. Retail Sales and Customer Behavior Analysis

Project Overview

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.

Business Objectives

  • Analyze overall sales performance
  • Identify top-selling products
  • Understand customer purchasing behavior
  • Evaluate revenue trends
  • Discover high-value customers
  • Generate business KPIs

SQL Concepts Used

  • SELECT
  • WHERE
  • ORDER BY
  • GROUP BY
  • Aggregate Functions
  • CASE Statements
  • Joins
  • Business KPI Reporting

2. Hospital Management and Patient Analytics

Project Overview

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.

Business Objectives

  • Analyze patient demographics
  • Evaluate doctor performance
  • Monitor appointment trends
  • Analyze treatment effectiveness
  • Track hospital revenue
  • Improve operational efficiency

SQL Concepts Used

  • Aggregate Functions
  • CASE Statements
  • CTEs
  • Window Functions
  • ROW_NUMBER()
  • RANK()
  • Business Reporting

3. Financial Loan Portfolio and Risk Analytics

Project Overview

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.

Business Objectives

  • Analyze loan applications
  • Evaluate funded amounts
  • Measure loan performance
  • Identify good vs bad loans
  • Monitor monthly lending trends
  • Perform portfolio risk analysis

SQL Concepts Used

  • Aggregate Functions
  • Date Functions
  • Subqueries
  • CASE Statements
  • Financial KPI Analysis
  • Risk Analytics

4. E-Commerce Sales and Customer Analytics

Project Overview

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.

Business Objectives

  • Analyze order performance
  • Evaluate customer purchasing behavior
  • Measure revenue trends
  • Identify high-performing products
  • Analyze customer segmentation
  • Generate business insights

SQL Concepts Used

  • Aggregate Functions
  • GROUP BY
  • CASE Statements
  • Joins
  • Date Functions
  • Business KPI Reporting

5. Football World Cup Tournament Analytics

Project Overview

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.

Business Objectives

  • Analyze tournament performance
  • Evaluate team statistics
  • Analyze player performance
  • Study goal scoring trends
  • Monitor match outcomes
  • Generate tournament insights

SQL Concepts Used

  • Aggregate Functions
  • CTEs
  • Window Functions
  • Ranking Functions
  • Date Functions
  • Sports Analytics

6. Milan Air Quality & Weather Analytics

Project Overview

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.

Business Objectives

  • 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

SQL Concepts Used

  • Aggregate Functions
  • CASE Statements
  • Common Table Expressions (CTEs)
  • Window Functions
  • ROW_NUMBER()
  • RANK()
  • DENSE_RANK()
  • LAG()
  • LEAD()
  • Running Averages
  • Time-Series Analysis

SQL Skills Demonstrated

Across these projects, the following SQL concepts have been applied:

SQL Fundamentals

  • SELECT
  • WHERE
  • ORDER BY
  • GROUP BY
  • HAVING
  • DISTINCT
  • LIMIT

Aggregate Functions

  • COUNT()
  • SUM()
  • AVG()
  • MIN()
  • MAX()

Joins

  • INNER JOIN
  • LEFT JOIN
  • RIGHT JOIN

Conditional Logic

  • CASE Statements
  • COALESCE()

Date Functions

  • YEAR()
  • MONTH()
  • DAY()

Common Table Expressions (CTEs)

  • Single CTE
  • Multi-step Analysis
  • Business Reporting

Window Functions

  • ROW_NUMBER()
  • RANK()
  • DENSE_RANK()
  • LAG()
  • LEAD()
  • Running Average

Analytical Techniques

  • Customer Segmentation
  • Revenue Analysis
  • Risk Analytics
  • Sports Analytics
  • Environmental Analytics
  • Time-Series Analysis
  • KPI Reporting
  • Business Intelligence

Tools & Technologies

  • SQL
  • DuckDB
  • Git
  • GitHub
  • Visual Studio Code

Repository Structure

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

Learning Outcomes

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.

Future Enhancements

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.

About

A collection of end-to-end SQL projects solving real-world business problems across retail, healthcare, finance, sports, e-commerce, and environmental analytics using DuckDB.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages