fix 'orderby' and 'groupby'