added aggregation to order_by