Aggregating numbers from different tables