Marketing and finance both report a monthly lead-to-purchase conversion rate, and for February 2025 one says 0% and the other says 8.6%. Marketing counts a purchase in the month its lead was created. Finance counts it in the month the purchase happened. Both divide by the leads created in the month, and you have been asked to put the two numbers side by side.
Return month (YYYY-MM), leads (leads created in the month), purchases_by_lead_month (conversions of type purchase whose lead was created in the month), purchases_by_conversion_month (conversions of type purchase whose converted_at falls in the month), rate_by_lead_month, and rate_by_conversion_month (each purchase count divided by leads, rounded to 3 decimals). Include every month of 2025 in which at least one lead was created. Order by month.
Create a free account to save your progress and reveal the worked answer for this free exercise. The complete practice library is available with Practice Pass or Mastery.