All projects
SQL

E-commerce Customer Insights (SQL)

SQL analysis of an e-commerce database to segment customers and surface revenue drivers.

SQLPostgreSQL

Business problem

The marketing team wanted to identify high-value customer segments for targeted campaigns.

Solution

Wrote optimized SQL queries with CTEs and window functions to compute RFM segments and cohort retention.

Key insights

  • Top RFM segment (12% of users) drove 47% of revenue
  • Repeat purchase rate dropped sharply after week 6
  • Mobile customers had higher frequency but lower AOV

Business impact

The team launched a segmented email flow that lifted repeat purchases in a follow-up test window.

Next project
Monthly Financial Reporting Workbook
View