About the “Net Revenue Retention (NRR) Cohort Performance” SQL Problem
Business Scenario
SaaS venture capital and finance teams evaluate company health through Net Revenue Retention (NRR), calculating whether expansion from existing accounts outpaces contraction and churn.
Expected Output & Criteria
Cohort ending MRR and Net Revenue Retention rate percentage.
Database Table Schema (PostgreSQL DDL)
PostgreSQL 16 WASMCREATE TABLE cohort_annual_revenue (
customer_id INT PRIMARY KEY,
cohort_year INT NOT NULL,
starting_mrr NUMERIC(10, 2) NOT NULL,
expansion_mrr NUMERIC(10, 2) NOT NULL,
contraction_mrr NUMERIC(10, 2) NOT NULL,
churned_mrr NUMERIC(10, 2) NOT NULL
);Target SQL Clauses & Operators
Want more Business Analytics practice?
Explore the full syllabus of 18 exercises and syntax guides.