code: func (a *AggregateResult) Sum(field string) float64 {
  	var sum float64
  
  	for i := range a.reduction {
  		fVal := a.reduction[i].Elem().FieldByName(field)
  		if !fVal.IsValid() {
  			panic(fmt.Sprintf("The field %s does not exist in the type %s", field, a.reduction[i].Type()))
  		}
  
  		sum += tryFloat(fVal)
  	}
  
  	return sum
  }
docs: // Sum returns the sum value of the aggregate grouping
  // panics if the field cannot be converted to an float64