Skip to content

Commit b21e82e

Browse files
authored
Merge pull request #107813 from timsander1/master
document aggregate index utilization
2 parents 12156f8 + 0f34ce7 commit b21e82e

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

articles/cosmos-db/sql-query-aggregates.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ description: Learn about SQL aggregate function syntax, types of aggregate funct
44
author: timsander1
55
ms.service: cosmos-db
66
ms.topic: conceptual
7-
ms.date: 03/05/2020
7+
ms.date: 03/16/2020
88
ms.author: tisande
99

1010
---
1111
# Aggregate functions in Azure Cosmos DB
1212

13-
Aggregate functions perform a calculation on a set of values in the SELECT clause and return a single value. For example, the following query returns the count of items within the `Families` container:
13+
Aggregate functions perform a calculation on a set of values in the `SELECT` clause and return a single value. For example, the following query returns the count of items within the `Families` container:
1414

1515
## Examples
1616

@@ -56,7 +56,7 @@ The results are:
5656

5757
## Types of aggregate functions
5858

59-
The SQL API supports the following aggregate functions. SUM and AVG operate on numeric values, and COUNT, MIN, and MAX work on numbers, strings, Booleans, and nulls.
59+
The SQL API supports the following aggregate functions. `SUM` and `AVG` operate on numeric values, and `COUNT`, `MIN`, and `MAX` work on numbers, strings, Booleans, and nulls.
6060

6161
| Function | Description |
6262
|-------|-------------|
@@ -71,6 +71,10 @@ You can also aggregate over the results of an array iteration.
7171
> [!NOTE]
7272
> In the Azure portal's Data Explorer, aggregation queries may aggregate partial results over only one query page. The SDK produces a single cumulative value across all pages. To perform aggregation queries using code, you need .NET SDK 1.12.0, .NET Core SDK 1.1.0, or Java SDK 1.9.5 or above.
7373
74+
## Remarks
75+
76+
These aggregate system functions will benefit from a [range index](index-policy.md#includeexclude-strategy). If you expect to do a `COUNT`, `SUM`, `MIN`, `MAX`, or `AVG` on a property, you should [include the relevant path in the indexing policy](index-policy.md#includeexclude-strategy).
77+
7478
## Next steps
7579

7680
- [Introduction to Azure Cosmos DB](introduction.md)

0 commit comments

Comments
 (0)