[[["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 provided content details the \u003ccode\u003eAggregationQuery.Types.Aggregation\u003c/code\u003e class within the Google Cloud Datastore V1 API, which defines an aggregation that produces a single result.\u003c/p\u003e\n"],["\u003cp\u003eThis class is part of the \u003ccode\u003eGoogle.Cloud.Datastore.V1\u003c/code\u003e namespace and is found in the \u003ccode\u003eGoogle.Cloud.Datastore.V1.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAggregationQuery.Types.Aggregation\u003c/code\u003e class implements multiple interfaces, including \u003ccode\u003eIMessage\u003c/code\u003e, \u003ccode\u003eIEquatable\u003c/code\u003e, \u003ccode\u003eIDeepCloneable\u003c/code\u003e, and \u003ccode\u003eIBufferMessage\u003c/code\u003e, enhancing its functionality and compatibility within the .NET ecosystem.\u003c/p\u003e\n"],["\u003cp\u003eThe documentation lists multiple versions of the API, from version 3.2.0 to the latest 4.15.0, and provides links to each version.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAggregationQuery.Types.Aggregation\u003c/code\u003e class includes properties such as \u003ccode\u003eAlias\u003c/code\u003e, \u003ccode\u003eAvg\u003c/code\u003e, \u003ccode\u003eCount\u003c/code\u003e, \u003ccode\u003eOperatorCase\u003c/code\u003e, and \u003ccode\u003eSum\u003c/code\u003e, which provide various options for configuring and naming aggregations.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Datastore v1 API - Class AggregationQuery.Types.Aggregation (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.AggregationQuery.Types.Aggregation)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.14.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.13.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.12.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.11.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.10.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.9.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.8.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.7.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.6.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.5.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.4.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.3.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.2.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.1.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.0.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.5.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.4.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.3.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.2.0/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation) \n\n public sealed class AggregationQuery.Types.Aggregation : IMessage\u003cAggregationQuery.Types.Aggregation\u003e, IEquatable\u003cAggregationQuery.Types.Aggregation\u003e, IDeepCloneable\u003cAggregationQuery.Types.Aggregation\u003e, IBufferMessage, IMessage\n\nReference documentation and code samples for the Google Cloud Datastore v1 API class AggregationQuery.Types.Aggregation.\n\nDefines an aggregation that produces a single result. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e AggregationQuery.Types.Aggregation \n\nImplements\n----------\n\n[IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage-1.html)[AggregationQuery](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.AggregationQuery)[Types](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.AggregationQuery.Types)[Aggregation](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation), [IEquatable](https://learn.microsoft.com/dotnet/api/system.iequatable-1)[AggregationQuery](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.AggregationQuery)[Types](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.AggregationQuery.Types)[Aggregation](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation), [IDeepCloneable](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IDeepCloneable-1.html)[AggregationQuery](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.AggregationQuery)[Types](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.AggregationQuery.Types)[Aggregation](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.AggregationQuery.Types.Aggregation), [IBufferMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IBufferMessage.html), [IMessage](https://cloud.google.com/dotnet/docs/reference/Google.Protobuf/latest/Google.Protobuf.IMessage.html) \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.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\nConstructors\n------------\n\n### Aggregation()\n\n public Aggregation()\n\n### Aggregation(Aggregation)\n\n public Aggregation(AggregationQuery.Types.Aggregation other)\n\nProperties\n----------\n\n### Alias\n\n public string Alias { get; set; }\n\nOptional. Optional name of the property to store the result of the\naggregation.\n\nIf not provided, Datastore will pick a default name following the format\n`property_\u003cincremental_id++\u003e`. For example: \n\n AGGREGATE\n COUNT_UP_TO(1) AS count_up_to_1,\n COUNT_UP_TO(2),\n COUNT_UP_TO(3) AS count_up_to_3,\n COUNT(*)\n OVER (\n ...\n );\n\nbecomes: \n\n AGGREGATE\n COUNT_UP_TO(1) AS count_up_to_1,\n COUNT_UP_TO(2) AS property_1,\n COUNT_UP_TO(3) AS count_up_to_3,\n COUNT(*) AS property_2\n OVER (\n ...\n );\n\nRequires:\n\n- Must be unique across all aggregation aliases.\n- Conform to \\[entity property name\\]\\[google.datastore.v1.Entity.properties\\] limitations.\n\n### Avg\n\n public AggregationQuery.Types.Aggregation.Types.Avg Avg { get; set; }\n\nAverage aggregator.\n\n### Count\n\n public AggregationQuery.Types.Aggregation.Types.Count Count { get; set; }\n\nCount aggregator.\n\n### OperatorCase\n\n public AggregationQuery.Types.Aggregation.OperatorOneofCase OperatorCase { get; }\n\n### Sum\n\n public AggregationQuery.Types.Aggregation.Types.Sum Sum { get; set; }\n\nSum aggregator."]]