The finance team wants a monthly view of loan disbursements with a running total. For each month (YYYY-MM from start_date), return the month, the count of new loans, total principal disbursed that month, and a cumulative principal total. Sort by month.
Schema
🔑idINT
🔗customer_idINT
loan_typeTEXT
principalREAL
interest_rateREAL
term_monthsINT
start_dateTEXT
statusTEXT
postgresql
Run your query to see results
Press Ctrl + Enter to execute