NXP-14879: refactor removing AggregateQuery