Allow order by to be overridden in query