CUSTOMERS  3,900SQL  MYSQL 8BI  POWER BILABELS GIVEN  NONE
LEVEL P-04PROMO RISK
◂ ALL PROJECTS
CASE FILE P-04 ── BUSINESS · BI

CUST
VALUE

DECODING CUSTOMER VALUE — SQL-DRIVEN RETENTION STRATEGY

Is a D2C fashion brand building a loyal customer base, or renting revenue with discounts?

The data came with no loyalty score, no churn label and no timestamps, so every segment, metric and recommendation is engineered from explicit, traceable rules.

THE CATCH
Every variable pair has |r| < 0.05. Loyalty can't be discovered in this data; it has to be constructed from transparent rules.
SCREEN ── FOUNDER DASHBOARD4 PANELS
43%
OF REVENUE IS PROMO-RELIANT
▸ OPEN DASHBOARD
SCORESCOREBOARD
PROMO-RELIANT
43%
$99K of $233K revenue rides on discounts.
DISCOUNT LIFT
≈$0
−$0.85 per customer overall, −$0.70 within men only.
IDEAL LOYALISTS
281
7% of customers: full price and repeat buyers.
AT-RISK
680
Customers rating below 3, for service recovery.
PATHMETHOD
LOOKS LIKEDISCOUNT▸MORE ORDERS▸LOYALTY?
ACTUALLYAUDIT▶FEATURES▶SQL SEGMENTS▶POWER BI▶PROMO SUNSET

Python audits the signal and engineers features, MySQL CTEs and window functions answer five business questions, and a four-panel founder dashboard shows the result.

BOSSHOW IT HOLDS UP
CORE ALOYALTY RULES

Two competing loyalty definitions were tested. loyal_B (no discount and rating ≥ 4) is primary because loyal_A is still ~44% discount-driven.

LOYAL_AFREQ + REPEAT
LOYAL_BFULL PRICE + ≥4★
IDEALBOTH
VALUE SCORE60 / 40 MIX
Weights and thresholds are documented judgement calls.
CORE BAUDIT FINDINGS

Discount and promo flags were identical, every subscriber was discounted, and only men were ever discounted, so gender-sensitive findings were re-tested within men only.

PROMO FLAGSIDENTICAL
SUBSCRIBERSALL DISCOUNTED
WOMEN DISCOUNTED0 OF 1,248
MEN-ONLY LIFT−$0.70
Observational, not causal: a promo holdout test is the next step.
FIG 1 ── CUSTOMER SEGMENTSSHARE OF 3,900
IDEAL
7.2%
MARGIN-SAFE
16.9%
DISC. REPEAT
12.8%
BARGAIN
30.2%
PASSIVE
32.8%
Red = full-price loyal segments
VERDICT
A thin but real loyal core (7%), and margin given away on 43% of customers for zero measurable return.
North-star metric: full-price revenue share, 57% today. The strategy works if it rises while total revenue holds.
RECOMMENDATIONS
▸ Sunset promotions in two phases; never discount the loyal core.
▸ Acquire Ideal-Customer lookalikes on behaviour, not demographics.
▸ Invest in organic-demand states.
▸ Service-recover the 680 at-risk customers with support, not discounts.
RULES OF PLAY
▸ One snapshot, no timestamps: retention can't be measured directly.
▸ Rule-based segments, documented so they can be challenged.
▸ No margin or cost data: margin given away is inferred.
▸ Likely synthetic data: the method transfers better than the numbers.
ARTEFACTS
DATA ▸ 3,900 customers × 18 columns
PYTHON ▸ Audit, cleaning, feature engineering
SQL ▸ MySQL 8 · CTEs · window functions
BI ▸ Power BI founder dashboard
[ ▸ DASHBOARD ]
[ ▸ SOURCE CODE ]
[ ▸ EXECUTIVE SUMMARY ]
◂ P-03 ETAGRAPH CONTINUE? ▸ ALL PROJECTS P-05 SECUREBANK ▸
LOKESH KUMAR
IIT Roorkee engineer building AI agents, LLM evals and data systems that change real decisions.
CONTACT
MAIL ▸ lokeshkumar22119032@gmail.com
GHUB ▸ github.com/lokifergusion9
LNKD ▸ in/lokesh-kumar-1768262b9
INDEX
░▒▓ END OF FILE ▓▒░LOKESH KUMAR · MMXXVI