PIVOT syntax has been enhanced to support the aggregation of PIVOT results. The new syntax option to use for this aggregation is WITH.
Benefits
- Improves the flexibility of the PIVOT function. You can use the enhanced syntax to aggregate resultant PIVOT columns, thereby avoiding writing complex SQL JOIN statements for aggregation.
- Performance is improved because you do not need to write JOIN statements to perform aggregation.
Considerations
This feature is a Teradata extension to the ANSI SQL standard.
Additional Information
For more information, see PIVOT and UNPIVOT and PIVOT in Teradata Vantage⢠SQL Functions, Expressions, and Predicates, B035-1145.