Aggregation rule refactoring: to have a single one for upper and upper_XX