Add groupBy and orderBy query components