Aggregate with extra column, order is important