changing position of 'order' in a query