Which channel brings customers who stay?
SQL to find which channels bring customers who stay.
SQL · CTE · Window functions
What changes.
Objective
Answer acquisition, retention, and profitability questions with optimized, reproducible SQL queries.
Results
Ready-to-replicate, documented queries.
How it was built.Decisions, evidence and details
Objective
Answer acquisition, retention, and profitability questions with optimized, reproducible SQL queries.
Methodology
- Review the relational schema and foreign keys.
- Build queries with JOINs and CTEs to derive user, order, and traffic metrics.
- Use window functions for cohorts and monthly churn.
- Export to CSV for dashboards in Tableau or Looker Studio.
Key visualizations
- Retention and monthly churn cohorts.
- Conversion and ARPU by acquisition channel.
- Revenue curve and LTV vs. CAC.
Results
- Ready-to-replicate, documented queries.
- Identification of the highest ROI acquisition channels.
- Key metrics (ARPU, LTV, churn) available for executive dashboards.