Fix raw sql query, make sure order direction is provided in the binding argument.