About the “Delinquency Aging Buckets (30/60/90 Days Past Due)” SQL Problem
Business Scenario
Credit risk modeling teams group delinquent consumer installment loans into standardized delinquency aging buckets to calculate required loan loss capital provisions.
Expected Output & Criteria
Aggregate outstanding unpaid principal grouped by loan delinquency aging bucket.
Database Table Schema (PostgreSQL DDL)
PostgreSQL 16 WASMCREATE TABLE consumer_loans (
loan_id INT PRIMARY KEY,
unpaid_principal NUMERIC(10, 2) NOT NULL,
days_overdue INT NOT NULL
);Target SQL Clauses & Operators
Want more CTEs practice?
Explore the full syllabus of 16 exercises and syntax guides.