The constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend theAggregateQueryclass.
Properties
query
getquery():Query<AppModelType,DbModelType>;
The query whose aggregations will be calculated by this object.
Plans and optionally executes this query. Returns a Promise that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).
A Promise that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).
Compares this object with the given object for equality.
This object is considered "equal" to the other object if and only ifotherperforms the same aggregations as thisAggregateQueryand the underlying Query ofothercompares equal to that of this object usingQuery.isEqual().
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[],[],null,["# Class AggregateQuery (7.11.0)\n\nVersion latestkeyboard_arrow_down\n\n- [7.11.0 (latest)](/nodejs/docs/reference/firestore/latest/firestore/aggregatequery)\n- [7.9.0](/nodejs/docs/reference/firestore/7.9.0/firestore/aggregatequery)\n- [7.7.0](/nodejs/docs/reference/firestore/7.7.0/firestore/aggregatequery)\n- [7.6.0](/nodejs/docs/reference/firestore/7.6.0/firestore/aggregatequery)\n- [7.5.0](/nodejs/docs/reference/firestore/7.5.0/firestore/aggregatequery)\n- [7.4.0](/nodejs/docs/reference/firestore/7.4.0/firestore/aggregatequery)\n- [7.3.1](/nodejs/docs/reference/firestore/7.3.1/firestore/aggregatequery)\n- [7.2.0](/nodejs/docs/reference/firestore/7.2.0/firestore/aggregatequery)\n- [7.1.0](/nodejs/docs/reference/firestore/7.1.0/firestore/aggregatequery)\n- [6.4.1](/nodejs/docs/reference/firestore/6.4.1/firestore/aggregatequery)\n- [6.3.0](/nodejs/docs/reference/firestore/6.3.0/firestore/aggregatequery)\n- [6.0.0](/nodejs/docs/reference/firestore/6.0.0/firestore/aggregatequery)\n- [5.0.2](/nodejs/docs/reference/firestore/5.0.2/firestore/aggregatequery)\n- [4.15.1](/nodejs/docs/reference/firestore/4.15.1/firestore/aggregatequery)\n- [4.14.2](/nodejs/docs/reference/firestore/4.14.2/firestore/aggregatequery)\n- [4.9.8](/nodejs/docs/reference/firestore/4.9.8/firestore/aggregatequery) \nA query that calculates aggregations over an underlying query.\n\nPackage\n-------\n\n[@google-cloud/firestore](../overview.html)\n\nRemarks\n-------\n\nThe constructor for this class is marked as internal. Third-party code should not call the constructor directly or create subclasses that extend the `AggregateQuery` class.\n\nProperties\n----------\n\n### query\n\n get query(): Query\u003cAppModelType, DbModelType\u003e;\n\nThe query whose aggregations will be calculated by this object.\n\nMethods\n-------\n\n### explain(options)\n\n explain(options?: firestore.ExplainOptions): Promise\u003cExplainResults\u003cAggregateQuerySnapshot\u003cAggregateSpecType, AppModelType, DbModelType\u003e\u003e\u003e;\n\nPlans and optionally executes this query. Returns a Promise that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).\n\nA Promise that will be resolved with the planner information, statistics from the query execution (if any), and the query results (if any).\n\n### get()\n\n get(): Promise\u003cAggregateQuerySnapshot\u003cAggregateSpecType, AppModelType, DbModelType\u003e\u003e;\n\nExecutes this query.\n\nA promise that will be resolved with the results of the query.\n\n### isEqual(other)\n\n isEqual(other: firestore.AggregateQuery\u003cAggregateSpecType, AppModelType, DbModelType\u003e): boolean;\n\nCompares this object with the given object for equality.\n\nThis object is considered \"equal\" to the other object if and only if `other` performs the same aggregations as this `AggregateQuery` and the underlying Query of `other` compares equal to that of this object using `Query.isEqual()`."]]