Skip to content

Commit f0202c4

Browse files
authored
Update aggregate-count.md
1 parent 6aa1f91 commit f0202c4

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

articles/cosmos-db/nosql/query/aggregate-count.md

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,11 @@ COUNT(<scalar_expr>)
2424
## Arguments
2525

2626
*scalar_expr*
27-
Is any scalar expression
27+
Any expression that results in a scalar value
2828

2929
## Return types
3030

31-
Returns a numeric expression.
31+
Returns a numeric (scalar) value
3232

3333
## Examples
3434

@@ -37,11 +37,12 @@ The following example returns the total count of items in a container:
3737
```sql
3838
SELECT COUNT(1)
3939
FROM c
40-
```
41-
COUNT can take any scalar expression as input. The below query will produce an equivalent results:
40+
```
41+
42+
In the first example, the parameter of the `COUNT` function is any scalar value or expression, but the parameter does not influence the result. The first example passes in a scalar value of `1` to the `COUNT` function. This second example will produce an identical result even though a different scalar expression is used. In the second example, the scalar expression of `2 + 3` is passed in to the `COUNT` function, but the result will be equivalent to the first function.
4243

4344
```sql
44-
SELECT COUNT(2)
45+
SELECT COUNT(2 + 3)
4546
FROM c
4647
```
4748

0 commit comments

Comments
 (0)