BigQuery - Daily Rate From Monthly Rate Based on Days In Year

Using the given MonthlyAmount and a date MonthDate inside the year you want to calculate for, get the daily rate based on the number of days in the year.

e.g.
A "normal" year and a leap year will give different results

SELECT
  <MonthlyAmount> * (SELECT 12 / SAFE_CAST(FORMAT_DATE('%j', LAST_DAY(<MonthDate>, YEAR)) AS INT64))