Calculating monthly interest for bank account
Suppose you're given the following table showing the monthly change in a bank account for a business:
The bank account started at $0 and earns an annual interest rate of 3% on the total account balance, paid out monthly (0.25% / month). Given this information, along with the table above, write a SQL query to return the account interest paid out each month. For simplicity, you can assume the cumulative total account balance does not go negative.
You can view/query the data in an interactive SQL fiddle here.
Subscribe to premium account to see the solution.Get premium now