Skip to content

Commit f936379

Browse files
authored
Update PRODUCT applies-to and refresh (#36034)
1 parent e6b3994 commit f936379

File tree

3 files changed

+33
-20
lines changed

3 files changed

+33
-20
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
author: rwestMSFT
3+
ms.author: randolphwest
4+
ms.date: 12/08/2025
5+
ms.service: sql
6+
ms.topic: include
7+
---
8+
9+
[!INCLUDE [Applies to](../../includes/applies-md.md)] [!INCLUDE [SQL Server 2025](_ss2025.md)] [!INCLUDE [Azure SQL Database](../../includes/applies-to-version/_asdb.md)] [!INCLUDE [_asmi](_asmi.md)] [!INCLUDE [Synapse Analytics](_asa.md)] [!INCLUDE [_fabric-dw](_fabric-dw.md)] [!INCLUDE [fabric-sqldb](_fabric-sqldb.md)]

docs/includes/fabric-sqldb.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
author: WilliamDAssafMSFT
33
ms.author: wiassaf
4-
ms.date: 10/21/2025
4+
ms.date: 12/08/2025
55
ms.service: sql
66
ms.topic: include
77
---
8-
SQL database in [!INCLUDE [fabric](fabric.md)]
8+
SQL database in Microsoft Fabric

docs/t-sql/functions/product-aggregate-transact-sql.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -29,35 +29,35 @@ monikerRange: "=fabric || =sql-server-ver17 || =sql-server-linux-ver17"
2929

3030
# PRODUCT (Transact-SQL)
3131

32-
**Applies to:** [!INCLUDE [sqlserver2025-asdb-asa-fabricsqldb](../../includes/applies-to-version/sqlserver2025-asdb-asa-fabricsqldb.md)]
32+
[!INCLUDE [sqlserver2025-asdb-asmi-asa-fabricdw-fabricsqldb](../../includes/applies-to-version/sqlserver2025-asdb-asmi-asa-fabricdw-fabricsqldb.md)]
3333

34-
Returns the PRODUCT of all the values, or only the DISTINCT values, in the expression. Use with numeric columns only. Null values are ignored.
34+
The `PRODUCT` function returns the product of all the values, or only the `DISTINCT` values, in an expression. Use with numeric columns only. Null values are ignored.
3535

3636
:::image type="icon" source="../../includes/media/topic-link-icon.svg" border="false"::: [Transact-SQL syntax conventions](../../t-sql/language-elements/transact-sql-syntax-conventions-transact-sql.md)
3737

3838
## Syntax
3939

40-
Aggregate function syntax.
40+
Aggregate function syntax:
4141

4242
```syntaxsql
4343
PRODUCT ( [ ALL | DISTINCT ] expression )
4444
```
4545

46-
Analytic function syntax.
46+
Analytic function syntax:
4747

4848
```syntaxsql
4949
PRODUCT ( [ ALL ] expression) OVER ( [ partition_by_clause ] [ order_by_clause ] )
5050
```
5151

5252
## Arguments
5353

54-
#### *ALL*
54+
#### ALL
5555

56-
Applies the aggregate function to all values. ALL is the default.
56+
Applies the aggregate function to all values. `ALL` is the default.
5757

58-
#### *DISTINCT*
58+
#### DISTINCT
5959

60-
Specifies that PRODUCT returns the PRODUCT of unique values.
60+
Specifies that `PRODUCT` returns the product of unique values.
6161

6262
#### *expression*
6363

@@ -81,12 +81,14 @@ Returns the product of all *expression* values in the most precise *expression*
8181
| **smallint** | **int** |
8282
| **int** | **int** |
8383
| **bigint** | **bigint** |
84-
| **decimal** category (p, s) | If (s == 0): **decimal(38, 0)** Else: **decimal(38, 6)** |
84+
| **decimal** category (*p*, *s*) | If *s* is `0`, **decimal(38, 0)**, otherwise **decimal(38, 6)** |
8585
| **money** and **smallmoney** category | **money** |
8686
| **float** and **real** category | **float** |
8787

8888
## Remarks
8989

90+
Support for `PRODUCT` in [!INCLUDE [ssazuremi-md](../../includes/ssazuremi-md.md)] is limited to [!INCLUDE [ssazure-sqlmi-autd](../../includes/ssazure-sqlmi-autd.md)].
91+
9092
`PRODUCT` is a deterministic function when used without the `OVER` and `ORDER BY` clauses. It's nondeterministic when specified with the `OVER` and `ORDER BY` clauses. For more information, see [Deterministic and nondeterministic functions](../../relational-databases/user-defined-functions/deterministic-and-nondeterministic-functions.md).
9193

9294
## Examples
@@ -95,33 +97,35 @@ Returns the product of all *expression* values in the most precise *expression*
9597

9698
### A. Multiply rows together
9799

98-
The following examples show using the PRODUCT function
100+
The following example uses the `PRODUCT` function:
99101

100102
```sql
101103
SELECT PRODUCT(UnitPrice) AS ProductOfPrices
102104
FROM Purchasing.PurchaseOrderDetail
103-
WHERE ModifiedDate <= '2002-05-24'
105+
WHERE ModifiedDate <= '2023-05-24'
104106
GROUP BY ProductId;
105107
```
106108

107-
Here's a partial result set.
109+
[!INCLUDE [ssresult-md](../../includes/ssresult-md.md)]
108110

109111
```output
110112
ProductOfPrices
111113
----------
112114
2526.2435
113115
41.916
114116
3251.9077
115-
21656.2655
116-
40703.3993
117-
4785336.3939
118-
11432159532.8367
119-
5898056095.7678
117+
640559.8491
118+
1469352.0378
119+
222137708.073
120+
11432159376.271
121+
5898056028.2633
122+
14030141.2883
123+
2526.4194
120124
```
121125

122126
### B. Use the OVER clause
123127

124-
The following example uses the PRODUCT function with the OVER clause to provide a rate of return on hypothetical financial instruments. The data is partitioned by `finInstrument`.
128+
The following example uses the `PRODUCT` function with the `OVER` clause to provide a rate of return on hypothetical financial instruments. The data is partitioned by `finInstrument`.
125129

126130
```sql
127131
SELECT finInstrument,

0 commit comments

Comments
 (0)