DataSharpener
← Back to home

Case Study

Customer Churn Analysis Using SQL & Tableau

A complete end-to-end analytics project

1. Introduction

Customer churn-when existing customers leave a service-directly impacts revenue, growth, and business stability. For subscription-based industries like telecom, reducing churn by even a few percentage points can result in millions saved.

This project analyzes a real telecom customer dataset to:

  • measure churn
  • identify drivers of churn
  • uncover customer segments at risk
  • propose data-driven retention strategies

Tools used:

SQLite + SQL for data cleaning & analysis

Tableau for visualization & dashboards

Dataset: Telco Customer Churn (7044 rows)

2. Business Problem

The telecom company is experiencing a high number of customer cancellations. Leadership wants to know:

  • Who is churning?
  • Why are they churning?
  • Which customer segments are at highest risk?
  • What actions can reduce churn?

3. Data Preparation (SQL)

3.1 Table Creation

The dataset was imported into a local SQLite database with the following schema:

customerID, gender, SeniorCitizen, Partner, Dependents, tenure, PhoneService, MultipleLines, InternetService, OnlineSecurity, OnlineBackup, DeviceProtection, TechSupport, StreamingTV, StreamingMovies, Contract, PaperlessBilling, PaymentMethod, MonthlyCharges, TotalCharges, Churn

A new feature was engineered:

TenureGroup

Customers were bucketed based on how long they had been with the company:

  • 0–6 months
  • 6–12 months
  • 13–24 months
  • 25–48 months
  • 48+ months

This helps identify when churn is most likely to occur.

4. SQL Analysis

4.1 Overall Churn Rate

SELECT 
  COUNT(*) AS total_customers,
  SUM(CASE WHEN Churn = 'Yes' THEN 1 ELSE 0 END) AS churned,
  100.0 * SUM(CASE WHEN Churn = 'Yes' THEN 1 ELSE 0 END) / COUNT(*) AS churn_rate
FROM telco_churn;

Result:

✔ Total Customers: 7044

✔ Churned: ~1869

✔ Churn Rate ≈ 26.5%

4.2 Churn by Contract Type

SELECT Contract,
       COUNT(*) AS customers,
       AVG(Churn = 'Yes') * 100 AS churn_rate
FROM telco_churn
GROUP BY Contract;

Insight:

Month-to-month contracts show the highest churn rate

1-year and 2-year contract customers are far more loyal

4.3 Churn by Tenure Group

SELECT TenureGroup,
       AVG(Churn = 'Yes') * 100 AS churn_rate
FROM telco_churn
GROUP BY TenureGroup;

Insight:

The first 6 months are the most dangerous: churn peaks sharply

Long-term customers (48+ months) rarely churn

4.4 Churn by Internet Service

Insight:

  • Fiber Optic customers have significantly higher churn
  • DSL customers churn less
  • “No Internet Service” customers have the lowest churn

4.5 Monthly Charges Analysis

A distribution analysis showed:

  • Churned customers tend to have higher MonthlyCharges
  • Retained customers pay lower average prices

5. Tableau Dashboard & Visualizations

A full interactive dashboard was built in Tableau consisting of:

  • 5.1 KPIs
    • Total Customers
    • Churned Customers
    • Churn Rate %
  • 5.2 Churn by Contract Type (Bar Chart)

    Month-to-month customers churn far more than others.

  • 5.3 Churn by Tenure Group (Bar Chart)

    Most churn happens early in the customer lifecycle.

  • 5.4 Churn by Internet Service (Bar Chart)

    Fiber customers show unusually high churn.

  • 5.5 Monthly Charges — Churned vs Retained (Box Plot)

    Churned customers have higher price sensitivity.

  • 5.6 Churn by Payment Method (Optional)

    Electronic check customers churn significantly more.

  • 5.7 Interactive Filters

    Users can filter the dashboard by: Contract · Internet Service · Tenure Group

Embedded dashboard

6. Key Insights

🔸 1. Month-to-month contract customers churn the most
Lack of commitment increases churn probability.
🔸 2. Early lifecycle churn is very high
Customers in their first 6 months are at greatest risk.
🔸 3. Fiber Optic customers churn more than DSL
Likely due to price or service experience issues.
🔸 4. High MonthlyCharges strongly correlate with churn
Price-sensitive customers are leaving.
🔸 5. Payment method affects churn
Customers paying via electronic check churn at the highest rate.

7. Recommendations

✔ 1. Launch onboarding campaigns for new customers (first 90 days)

  • Personalized tips
  • Discounts
  • Early-touch support

✔ 2. Offer incentives for long-term contracts

  • Discounts for 1- or 2-year commitments
  • Loyalty points

✔ 3. Review pricing strategy for high-charge customers

  • Targeted retention discounts
  • Tiered pricing

✔ 4. Investigate Fiber Optic service issues

  • Speed, reliability, or customer support concerns

✔ 5. Encourage automated payment methods

  • Auto-pay customers churn less
  • Offer a discount for signup.

Next step

Need churn findings tailored to your data?

Book a demo