A string used to retrieve the result of this aggregation.
If this is not provided, Datastore will pick a default name with a prefix of property_
followed by an auto-incremented ID, e.g. property_1.
A string used to retrieve the result of this aggregation.
If this is not provided, Datastore will pick a default name with a prefix of property_
followed by an auto-incremented ID, e.g. property_1.
A string used to retrieve the result of this aggregation.
If this is not provided, Datastore will pick a default name with a prefix of property_
followed by an auto-incremented ID, e.g. property_1.
[[["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-08-07 UTC."],[[["\u003cp\u003eThe latest version of the Google Cloud Datastore V1 API Aggregations is 4.15.0, with documentation available, and previous versions from 4.14.0 down to 3.2.0 are also documented.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAggregations\u003c/code\u003e class within the \u003ccode\u003eGoogle.Cloud.Datastore.V1\u003c/code\u003e namespace serves as a factory for generating various types of aggregations in the Google Cloud Datastore v1 API.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAverage\u003c/code\u003e method calculates the average of a specified property, allowing for the optional assignment of an alias to retrieve the result, and if no alias is given, one will be generated.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eCount\u003c/code\u003e method returns an aggregation that counts all results, and it similarly allows for the optional assignment of an alias to retrieve the result.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eSum\u003c/code\u003e method aggregates the sum of a given property, also allowing the optional setting of an alias for the output, otherwise, it will generate one automatically.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Datastore v1 API - Class Aggregations (4.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.15.0 (latest)](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.Aggregations)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.14.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.13.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.12.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.11.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.10.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.9.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.8.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.7.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.6.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.5.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.4.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.3.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.2.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.1.0/Google.Cloud.Datastore.V1.Aggregations)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.0.0/Google.Cloud.Datastore.V1.Aggregations)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.5.0/Google.Cloud.Datastore.V1.Aggregations)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.4.0/Google.Cloud.Datastore.V1.Aggregations)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.3.0/Google.Cloud.Datastore.V1.Aggregations)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.2.0/Google.Cloud.Datastore.V1.Aggregations) \n\n public static class Aggregations\n\nReference documentation and code samples for the Google Cloud Datastore v1 API class Aggregations.\n\nFactory for different types of Aggregations. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e Aggregations \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Google.Cloud.Datastore.V1](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1)\n\nAssembly\n--------\n\nGoogle.Cloud.Datastore.V1.dll\n\nMethods\n-------\n\n### Average(string, string)\n\n public static AggregationQuery.Types.Aggregation Average(string property, string alias = \"\")\n\nReturns an instance of an average aggregation for the specified property.\n\n### Count(string)\n\n public static AggregationQuery.Types.Aggregation Count(string alias = \"\")\n\nReturns an instance of count(\\*) aggregation.\n\n### Sum(string, string)\n\n public static AggregationQuery.Types.Aggregation Sum(string property, string alias = \"\")\n\nReturns an instance of a sum aggregation for the specified property."]]