How can I sum value across entries assigned to a category for a given year across multiple years? I have a category group named country.   Each entry in posts is assigned to a country and a dollar value.  dollar value is a field, NOT a table cell.  

On a country's given page (i.e., a category page), I want to sum the total value across all entries assigned to a given country by year (date posted) across all years for which there are entries.  

Help...
{% amount = craft.entries
   .postDate(['and', '&gt;=' someDate, '&lt;=' ~ someOtherTime])
   .select('dollar')
   .relatedTo(category)
   .sum()
%}


Loop through all years and sum the value