Skip to content

Commit 70d55c5

Browse files
authored
Merge pull request #6431 from jonathanmbaker/patch-1
Improved readability of 'complex PIVOT TABLE' example by adding indentation
2 parents 189e657 + e86ce99 commit 70d55c5

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

docs/t-sql/queries/from-using-pivot-and-unpivot.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,14 +89,16 @@ The following code displays the same result, pivoted so that the `DaysToManufact
8989
```sql
9090
-- Pivot table with one row and five columns
9191
SELECT 'AverageCost' AS Cost_Sorted_By_Production_Days,
92-
[0], [1], [2], [3], [4]
92+
[0], [1], [2], [3], [4]
9393
FROM
94-
(SELECT DaysToManufacture, StandardCost
95-
FROM Production.Product) AS SourceTable
94+
(
95+
SELECT DaysToManufacture, StandardCost
96+
FROM Production.Product
97+
) AS SourceTable
9698
PIVOT
9799
(
98-
AVG(StandardCost)
99-
FOR DaysToManufacture IN ([0], [1], [2], [3], [4])
100+
AVG(StandardCost)
101+
FOR DaysToManufacture IN ([0], [1], [2], [3], [4])
100102
) AS PivotTable;
101103

102104
```

0 commit comments

Comments
 (0)