Skip to content
Quantoros

Of the customers who made a payment in March 2026, what percent also made a payment in April 2026? Return one number…

SQLLevel: AdvancedServicing and risk analytics

Of the customers who made a payment in March 2026, what percent also made a payment in April 2026? Return one number rounded to 1 decimal, aliased retention_pct. Month-over-month retention is a core loss-mitigation and servicing metric.

Table definitions (from the source exercise):

CREATE TABLE customers(customer_id INTEGER PRIMARY KEY, name TEXT, city TEXT, signup_date TEXT, credit_score INTEGER);
CREATE TABLE payments(payment_id INTEGER PRIMARY KEY, customer_id INTEGER, payment_date TEXT, amount REAL, method TEXT);
Hints
  • Define one output row and the source-table keys.
  • Check duplicates, NULLs and the order of filtering and aggregation.

Answer

This answer is part of mentoring

Advanced questions come with a full breakdown and a mock interview with a working quant researcher. The first call is free.

Source and licence: SQL Practice Lab — Ebrahim Sharifi · MIT

Related questions