Free tools / DPD and buckets
DPD and delinquency bucket SQL prompt
Builds a prompt that writes the DPD and bucket query from your instalment schedule and payment tables. It is free, needs no sign-up, and works from table and column names alone.
What you enter
You type names only: table and column names, never customer data.
- Instalment schedule table
- Loan id column
- Due date column
- Due amount column
- Payment table
- Payment date column
- Payment amount column
- As-of date
- Grace days
- Payment allocation
- Buckets
How to use it
- Fill the table and column names. Keep the allocation rule consistent with your collections system.
- Paste the prompt, answer the AI questions, copy the SQL.
- Run it in your own database on one month-end date.
- Work through the checks below before using the output.
Checks to run on the answer
AI can write SQL that looks right and is wrong. Run these checks before you trust the result.
- Row count equals the number of loans with an instalment due by the as-of date.
- No negative DPD and no null bucket.
- Sum of overdue amount reconciles to the finance overdue figure within a small tolerance.
- Pick 10 loans across buckets and trace each by hand to the schedule and payments.
- Joining schedule to payments did not multiply rows (compare the count before and after the join).
Open the tool
You get the ready prompt, the checks above, what healthy and warning results look like, and how to present the result to an approver.
Open the free toolsRelated guides
What is DPD (days past due) and how to calculate it
DPD counts how many days a loan is overdue. Learn the rule, a worked example with several instalments, and the mistakes that make DPD wrong.
BasicsDelinquency buckets: 1-30, 31-60, 61-90 and 90+ explained
What delinquency buckets are, how DPD maps to them, how they link to RBI's SMA categories and Ind AS 109 stages, and how to report them.