Support for aggregate query