• Define a "group" for each purchase_date.

  • Compute the sum within each group.

  • The group expressions must appear in the select clause, e.g. purchase_date