Why Are Customers Leaving? – A Simple Churn Analysis
🎯 Goal: Figure out why some customers are leaving (churning) and how to stop it.
This query shows of all the clients, 27% have canceled Telco services.
--1. How many customers are leaving? Look at the percentage of customers who have Churn = Yes
Select
ROUND(SUM(CASE WHEN Churn = 'Yes' THEN 1 ELSE 0 END) * 100.0 / COUNT(*), 2) as Churn_percentage
from
Churn.csvThis query shows of all the different contract types Telco offers. This query shows that the highest percentage of churns come from the monthly contract. For what I see in the database, usually they don't have extra services. I would recommend pushing at least yearly contrcats and add free extra services for the first year. That way, customers have a year to really enjoy the benefits of Telco services.
--2. Does contract type affect churn? Compare churn rates for customers with month-to-month vs 1-year or 2-year contracts.
Select
contract,
ROUND(SUM(CASE WHEN churn = 'Yes' THEN 1 ELSE 0 END) * 100.0 / COUNT(*), 2) as churns_per_contract
From
Churn.csv
Group By contract
order by churns_per_contract DESC
This query shows that churned customers tend to pay more, those are also monthly customers if we compare with the previous quesry. Seem like they are paying more for less hence my recommendation of better deal for yearly contracts.
--3. Are customers with higher bills more likely to leave?
Select
CASE WHEN churn = 'Yes' THEN 'Churn' END as churn_status,
ROUND(AVG(monthlycharges),2) as avg_month_charge
From
Churn.csv
Where churn = 'Yes'
Group by churn
UNION
Select
CASE WHEN churn = 'No' THEN 'No Churn' END as churn,
ROUND(AVG(monthlycharges),2) as avg_month_charge
From
Churn.csv
Where churn = 'No'
Group by churnIn this following query we can see the count of churns per customer_tier (lenght of business with the company). Churn with new customers (monthly consumers) is 4 times higher than regular consumers (yearly)
--4. Do long-term customers leave less often?
SELECT
CASE
WHEN tenure BETWEEN 1 AND 18 THEN 'New Customer 0–1.5 years'
WHEN tenure BETWEEN 19 AND 36 THEN 'Regular Customer 1.5–3 years'
WHEN tenure BETWEEN 36 AND 54 THEN 'Loyal Customer 3–4.5 years'
ELSE 'Senior Customer 4.5–6 years'
END AS customers_tier,
COUNT(*) AS count_of_churn
FROM
Churn.csv
WHERE
churn = 'Yes'
GROUP BY 1
ORDER BY 2 DESCFinaly, this next query shows that those customers that do have extra services, see the value in a more long-term contract option. Almost triple the amount of churns are from monthly based contracts.
--5. Does having extra services like Online Security or Tech Support help reduce churn?
SELECT
'Have Services' AS Service_Status,
ROUND(COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Churn.csv where churn = 'Yes'), 2) AS churn_percent
FROM Churn.csv
WHERE churn = 'Yes' AND (onlinesecurity = 'Yes' OR techsupport = 'Yes')
UNION ALL
SELECT
'No Services' AS Service_Status,
ROUND(COUNT(*) * 100.0 / (SELECT COUNT(*) FROM Churn.csv where churn = 'Yes'), 2) AS churn_percent
FROM Churn.csv
WHERE churn = 'Yes' AND (onlinesecurity = 'No' AND techsupport = 'No')