Skip to main content
All Problems
easy0% acceptance

Total Interest Paid by Loan Type

The finance department wants to know how much interest has been collected for each loan type. Return loan_type and total_interest (sum of interest_paid from payments). Sort by total_interest descending.

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