About the “Quarterly Logo Churn Rate with CTEs” SQL Problem
Business Scenario
SaaS venture capital investors judge retention using Quarterly Logo Churn Rate: (churned customers during quarter) / (total customers active at quarter start) * 100%.
Expected Output & Criteria
Single row summary with total_accounts, churned_accounts, and churn_rate_pct.
Database Table Schema (PostgreSQL DDL)
PostgreSQL 16 WASMThis challenge executes directly against the following relational schema in your browser:
CREATE TABLE saas_customers (
account_id INT PRIMARY KEY,
customer_name VARCHAR(100) NOT NULL,
signup_date DATE NOT NULL,
status VARCHAR(20) NOT NULL
);Target SQL Clauses & Operators
WITHCOUNTROUND
Want more CTEs practice?
Explore the full syllabus of 12 exercises, syntax guides, and interview pitfalls.