NXP-15042: add aggregates support to query api
NXP-15042: test aggregates support