Skip to content

Commit 4a0f7b2

Browse files
authored
Added missing sql/syntaxsql tags
1 parent 0c1cfed commit 4a0f7b2

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

docs/t-sql/functions/var-transact-sql.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ monikerRange: ">=aps-pdw-2016||=azuresqldb-current||=azure-sqldw-latest||>=sql-s
3030

3131
## Syntax
3232

33-
```
33+
```syntaxsql
3434
-- Aggregate Function Syntax
3535
VAR ( [ ALL | DISTINCT ] expression )
3636
@@ -64,7 +64,7 @@ VAR ([ ALL ] expression) OVER ( [ partition_by_clause ] order_by_clause)
6464
### A: Using VAR
6565
The following example returns the variance for all bonus values in the `SalesPerson` table in the [!INCLUDE[ssSampleDBnormal](../../includes/sssampledbnormal-md.md)] database.
6666

67-
```
67+
```sql
6868
SELECT VAR(Bonus)
6969
FROM Sales.SalesPerson;
7070
GO
@@ -75,7 +75,7 @@ GO
7575
### B: Using VAR
7676
The following example returns the statistical variance of the sales quota values in the table `dbo.FactSalesQuota`. The first column contains the variance of all distinct values and the second column contains the variance of all values including any duplicates values.
7777

78-
```
78+
```sql
7979
-- Uses AdventureWorks
8080

8181
SELECT VAR(DISTINCT SalesAmountQuota)AS Distinct_Values, VAR(SalesAmountQuota) AS All_Values
@@ -93,7 +93,7 @@ Distinct_Values All_Values
9393
### C. Using VAR with OVER
9494
The following example returns the statistical variance of the sales quota values for each quarter in a calendar year. Notice that the ORDER BY in the OVER clause orders the statistical variance and the ORDER BY of the SELECT statement orders the result set.
9595

96-
```
96+
```sql
9797
-- Uses AdventureWorks
9898

9999
SELECT CalendarYear AS Year, CalendarQuarter AS Quarter, SalesAmountQuota AS SalesQuota,

0 commit comments

Comments
 (0)