Fix aggregates in case of no aggregation variables