Session Ready
Exercise

Ratio of last month's and last year's average

An interesting variable to add to the basetable is the average gift a donor donated last month compared to the average gift a donor donated last year. In this exercise, you will learn how to add this variable to the basetable. The gifts made last month by donors are already selected in gifts_last_month and the gifts made last year are selected in gifts_last_year.

Instructions
100 XP
  • Calculate for each donor in gifts_last_month the average donation in the last month.
  • Calculate for each donor in gifts_last_year the average donation in the last year.
  • Add the average donation last month and average donation last year to the basetable.
  • Calculate the ratio of last month's and last year's average donation in the basetable.