Using latest record for daily monitoring
So in a credit customer database, I basically have two tables:
- Customer/portfolio table -> this would record daily update of portfolio movement (outstanding amount, fees, days past due, etc.)
- Credit limit usage table -> this would record changes in customer's credit limit utilization, meaning it would get updated only if there's change
What I want to do is simple: by joining credit limit usage table to the customer/portfolio table, I'd like to add a column that'd show a customer's current credit limit for each day. If there's no change in credit limit, it would simply show the latest one.
Since the credit limit table doesn't update daily while customer table does, how am I going to join the two tables?
Thanks a bunch.