Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Simple Interest Due

Simple interest = principal x annual_rate / 100 x months / 12. Return each loan id and its interest rounded to 2 decimals, ordered by id.

Table schema

Loans(id INT PRIMARY KEY, customer VARCHAR(10), principal INT, annual_rate INT, months INT)

Sample data

id | customer | principal | annual_rate | months
1 | Ann | 1000 | 12 | 6
2 | Bob | 2000 | 10 | 12
3 | Ann | 500 | 8 | 3

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.