• For each customer compute sum of unpaid.

  • But only for purchases satisfying the condition.

  • age(purchase_date): Returns an interval representing time since right now.

  • interval '1 year': Specifies a 1-year interval.

  • The age function and interval type are Postgres-specific. Other database systems have similar facilities.