Skip to content

Commit 061c1d6

Browse files
authored
Merge pull request #110972 from timsander1/master
update distinct and Group By limitation
2 parents a44009e + 2f311f1 commit 061c1d6

File tree

2 files changed

+10
-4
lines changed

2 files changed

+10
-4
lines changed

articles/cosmos-db/sql-query-group-by.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Learn about the GROUP BY clause for Azure Cosmos DB.
44
author: timsander1
55
ms.service: cosmos-db
66
ms.topic: conceptual
7-
ms.date: 10/11/2019
7+
ms.date: 04/10/2020
88
ms.author: tisande
99

1010
---
@@ -48,6 +48,12 @@ The GROUP BY clause divides the query's results according to the values of one o
4848
- Subqueries
4949
- Aggregate system functions (these are only allowed in the SELECT clause)
5050

51+
Queries with an aggregate system function and a subquery with `GROUP BY` are not supported. For example, the following query is not supported:
52+
53+
```sql
54+
SELECT COUNT(UniqueLastNames) FROM (SELECT AVG(f.age) FROM f GROUP BY f.lastName) AS UniqueLastNames
55+
```
56+
5157
## Examples
5258

5359
These examples use the nutrition data set available through the [Azure Cosmos DB Query Playground](https://www.documentdb.com/sql/demo).

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
---
22
title: SQL keywords for Azure Cosmos DB
33
description: Learn about SQL keywords for Azure Cosmos DB.
4-
author: markjbrown
4+
author: timsander1
55
ms.service: cosmos-db
66
ms.topic: conceptual
7-
ms.date: 03/17/2020
8-
ms.author: mjbrown
7+
ms.date: 04/10/2020
8+
ms.author: tisande
99

1010
---
1111
# Keywords in Azure Cosmos DB

0 commit comments

Comments
 (0)