E-commerce-Funnel-Retention-Analysis-With-SQL

E-commerce Funnel Retention Analysis With SQL

Go back to the portfolio

Within the Growth and Retention team of an E-commerce platform, the Product Director stated: “We need to understand at which stage of the process we lose users and how we can improve their retention over time.” SQL was used to map the full conversion funnel, identify the main drop-off points, evaluate user retention by cohorts, and propose actionable improvements based on the data.

This project focuses on analyzing the full user funnel and retention performance using SQL. It aims to identify where users drop off, calculate conversion rates between key stages, and evaluate retention by cohorts over time (D7, D14, D21, D28). The analysis also examines how conversion and retention vary by country, device category, and referral source, and supports data-driven recommendations through validated results and executive-level insights.

Project Objectives

Create CTEs by stage

Objective:

cte by stage


Segment the Overall Funnel by Country

Objective: Group funnel conversions by country and identify the stage of the funnel where the most users are lost.

funnel by country


funnel by country table


Count Cumulative Active Users by Country (D7, D14, D21, D28)

Objective: For each country, count cumulative active users since their registration, within the 2025-01-01 → 2025-08-31 range, on day 7, day 14, day 21, and day 28.

count by country


Define the Signup Cohort

Objective: Analyze retention by cohort. Create an SQL query that assigns a cohort in YYYY-MM format to each user (using their first signup date).

define cohort


Calculate Retention by Cohort and Period (D7, D14, D21, D28)

Objective: For each monthly cohort (YYYY-MM), calculate the percentage of active users on day 7, 14, 21, and 28 since their signup.

retention by cohort


retention by cohort table


Executive Report: User Conversion & Retention Analysis

1. Context An analysis of the user lifecycle (end-to-end funnel and retention) was conducted to identify friction points and evaluate user loyalty.

2. Key Findings

3. Strategic Recommendations


Author

Gerardo Olmedo – Data Analyst


Go back to the portfolio