Menu
hardAEON · date-timeGlobal · hiring in AsiaBasic

Count overdue installments by ageing bucket

Collections reports unpaid installments by how long they have been overdue, as of a fixed reporting date of 2026-06-30.

An installment is unpaid when paid_date is null. Days past due is the number of days from its due_date to the reporting date; anything not yet at least 1 day overdue is out of scope.

Return bucket and loan_count for all four buckets in dpd_buckets, including any bucket with no installments in it, ordered by the bucket's sort_order.

Schema

dpd_buckets
bucketTEXT
sort_orderINT
min_daysINT
max_daysINT
installments
installment_idINT
borrowerTEXT
due_dateDATE
paid_dateDATE

Basic

The example input, expected output, and walkthrough for this question unlock with a Basic plan.

↑ Read the question

Basic

This is a Basic question

Premium practice questions unlock with a Basic plan. The full solution, expected output, and grading are available to Basic members.

See Basic plans

RM 25/mo · cancel anytime

Keep going

Company names are trademarks of their respective owners, used here only to describe practice material. mahir_data is not affiliated with, endorsed by, or sponsored by any company named on this site. Terms.