An open API service indexing awesome lists of open source software.

https://github.com/egbe34/sql-portfolio

SQL portfolio showcasing business-focused queries for KPIs, retention, churn, RFM, and Pareto analysis. Built with sample commerce data for analytics and BI use cases.
https://github.com/egbe34/sql-portfolio

bigquery business-intelligence churn-analysis cohort-analysis data-analysis kpi postgresql rfmsegmentation sql windowfunction

Last synced: about 1 month ago
JSON representation

SQL portfolio showcasing business-focused queries for KPIs, retention, churn, RFM, and Pareto analysis. Built with sample commerce data for analytics and BI use cases.

Awesome Lists containing this project

README

          

# SQL Portfolio Analytics and Business Intelligence

This repository highlights practical SQL projects I have worked on, with a focus on business analytics and reporting.
It contains queries that demonstrate how SQL can be used to answer real business questions, build KPIs, and support decision-making.

## Data Structure
The repository includes a small commerce-style dataset stored in the `data` folder:
- Customers
- Orders
- Order Items
- Products

These tables represent a simplified transactional environment, which allows me to demonstrate SQL solutions that are directly relevant to business problems.

## Core Queries
The main queries are available in the `sql` folder:
- **Monthly Revenue KPIs**: calculates GMV, orders, active customers, and AOV per month.
- **Cohort Retention**: measures how customers from different signup months remain active over time.
- **RFM Segmentation**: builds a recency, frequency, and monetary table for customer analysis.
- **Churn Candidates**: identifies customers who have not purchased in the last 60 days.
- **Pareto 80/20 Products**: uses window functions to show which products contribute the most to total revenue.

## How to Run the Queries
1. Load the CSV files into your database of choice (PostgreSQL, MySQL, or BigQuery).
2. Run the SQL scripts in your SQL client or terminal.
3. Adjust date functions slightly if you are working in BigQuery or MySQL, as syntax may differ.

## What This Portfolio Shows
- Ability to translate business questions into SQL solutions.
- Experience with KPIs such as revenue, retention, churn, and product performance.
- Competence with advanced SQL techniques including joins, CTEs, and window functions.

This portfolio demonstrates the type of SQL work I deliver in real analytics and BI roles.