order oricesses earliest end_date first