Stats calculation depending on the aggregation of the input file