About the “Churned MRR Concentration by Industry Sector” SQL Problem
Business Scenario
The board of directors wants an audit of lost monthly recurring revenue (MRR) due to customer cancellations. They need to identify industry verticals that experienced at least $3,000 in lost MRR.
Expected Output & Criteria
Summary of lost MRR and churned accounts per industry sector with lost MRR >= $3,000.
Database Table Schema (PostgreSQL DDL)
PostgreSQL 16 WASMThis challenge executes directly against the following relational schema in your browser:
CREATE TABLE saas_contracts (
contract_id INT PRIMARY KEY,
company_name VARCHAR(100) NOT NULL,
industry_sector VARCHAR(50) NOT NULL,
mrr_value NUMERIC(10, 2) NOT NULL,
contract_status VARCHAR(20) NOT NULL
);Target SQL Clauses & Operators
GROUP BYSUMCOUNTHAVING
Want more Aggregations practice?
Explore the full syllabus of 12 exercises, syntax guides, and interview pitfalls.