Home / Projects
DA · BA-01In progress

Customer Churn — Revenue at Risk

Identifying the customer segments most likely to cancel and quantifying the financial impact, so retention budget goes where it moves the needle.

Data sourceTelco Customer Churn (Kaggle) — ~7,000 customer records with demographic, contractual and usage attributes. Olist is a drop-in alternative for an order-based churn framing.
ArchitectureCSV load → PostgreSQL → segmentation views with CTEs → window functions for revenue at risk → Power BI / Tableau dashboard
StoragePostgreSQL — schema and segmentation views versioned as SQL under sql/
Stack
SQLPostgreSQLCTEsWindow functionsPower BITableau
StatusIn progress

Context

A telecom (or subscription) business loses a meaningful share of its customer base every month. Commercial leadership needs to know which segments concentrate the most cancellation risk — and what that risk is worth in revenue — to spend the retention budget efficiently instead of across the board.

Business Problem

Which customer characteristics — contract type, tenure, payment method, service usage — best explain cancellation, and how much revenue is at risk in each segment?

The second half of that question is the one that decides where budget goes. A segment can churn at a high rate and still be worth ignoring if it carries little revenue; a lower-rate segment attached to high monthly charges can matter far more.

Architecture

Telco CSV · Kaggle PostgreSQL Cleaned tables CTE segmentation views Revenue-at-risk model Power BI / Tableau Executive summary

The analytical logic lives in SQL, not in the BI tool. Segmentation views are defined once in PostgreSQL with CTEs, and revenue at risk is computed with window functions — SUM() OVER (PARTITION BY ...) and RANK() — so the dashboard reads from a modeled layer rather than re-deriving the numbers in a measure. That keeps the figures reproducible outside the BI tool and makes them auditable line by line.

Data Source

Methodology

Structured with CRISP-DM to keep the work business-first and reproducible:

  1. Business Understanding — frame the question in revenue terms: which segments to protect, and what they are worth.
  2. Data Understanding — profile the dataset in SQL: overall churn rate and distribution across contract type, tenure, and payment method.
  3. Data Preparation — model the data in PostgreSQL; build segmentation views with CTEs by contract type, tenure band, and payment method.
  4. Modeling — apply window functions (SUM() OVER (PARTITION BY ...), RANK()) to compute revenue at risk and rank segments by exposure.
  5. Evaluation — cross-check every dashboard figure against direct SQL aggregations; confirm segment totals reconcile to the global total.
  6. Deployment — publish an interactive dashboard (Power BI / Tableau) with cross-filters by segment, tenure, and service.

AI assists, human validates

An LLM drafts the executive summary from the numbers the SQL layer computes, and proposes candidate labels for the high-risk segments — for example, "new month-to-month, electronic-check payers." The analyst validates every figure and label against the underlying data before it ships. The model accelerates the write-up; it does not source the conclusions.

Challenges

These are the problems the build has to solve — named up front so the finished project can be judged on how it handled them.

Results

In progress. The SQL model and the dashboard are still being built, so no churn rates and no revenue-at-risk figures are published here yet. The real numbers, the dashboard views behind them, and the recommendations they support go up when the build is done.

Hypotheses to test — not findings

The patterns below come from prior work on this dataset, not from this analysis. They are what the model is built to quantify, and each will ship with its exact figure and a supporting dashboard view — including any that turn out not to hold:

The provisional recommendations in the repository README — prioritizing outreach in the first 90 days, incentivizing migration off month-to-month, and reviewing the electronic-check payment experience — follow from those hypotheses, and will be re-prioritized against the real revenue-at-risk figures during the build.

Tech Stack

CategoryTool
DatabasePostgreSQL
ModelingSQL (CTEs, window functions, joins)
VisualizationPower BI / Tableau
AI assistLLM for executive-summary drafting and segment-label proposals — analyst-validated
Cloud (optional)AWS
VersioningGit / GitHub
← Previous
Interactive Dashboard + Narrative