Earlier, we discovered the ability to execute aggregates to find totals and subtotals using the GROUP BY. However, an individual row’s detail column data is available when using aggregates. The actual values are not seen, only the answer.
Teradata has the capability to generate the total and subtotals and at the same time display the detail data from the rows that goes into creating the totals. In this chapter, we explore the use of the WITH and WITH...BY functions to provide both totals and subtotals.
The following table is used for the SQL examples in this chapter:
Compliance – Teradata Extension ...