Attach the policy rate in force on each date
The opr_changes table records each time the Overnight Policy Rate was changed, and the date the new rate took effect. A rate stays in force until the next change supersedes it.
For every loan in loans, find the rate that was in force on its drawdown_date.
Return loan_id, drawdown_date and opr — the rate that applied on that date.
Schema
| effective_from | DATE |
| opr | NUMERIC |
| loan_id | INT |
| drawdown_date | DATE |
| amount | NUMERIC |
Basic
The example input, expected output, and walkthrough for this question unlock with a Basic plan.
Basic
The reference solution and walkthrough for this question unlock with a Basic plan.
Basic
This is a Basic question
Premium practice questions unlock with a Basic plan. The full solution, expected output, and grading are available to Basic members.
RM 25/mo · cancel anytime