Add 'order by' in dequeue query.