Simplify AST, order by clause can be any term.