Grouping the Answerset - SQL Assistant

Teradata SQL Assistant for Microsoft Windows User Guide

Product
SQL Assistant
Release Number
15.00
Language
English (United States)
Last Update
2018-09-27
dita:id
B035-2430
lifecycle
previous
Product Category
Teradata Tools and Utilities

Grouping the Answerset

Teradata SQL Assistant can display data rows in the Answerset window in a grouped, sorted order. To use grouping, click on the Allow Grouping tool button.

To group data columns in the Answerset window

1 Ensure the Answerset window is active and click the Allow Grouping button . This displays a Group Bar above the spreadsheet.

2 Drag the column header you want to group by to the Group Bar.

If you group by a single column, each row in that column displays the column name followed by the column value and the number of rows that have this value in parentheses. To open a group, click on the + symbol at the left of the row.

3 To group by multiple columns, drag the additional column headers to the right of the previous ones on the group bar. They are connected in descending order.

The top level group continues to display the column name and data value, but does not display the number of rows that contain that value. The lower level Group rows display the column number (starting at column zero) followed by the data value for that group. Each header you drag to the Group Bar display a Sort icon to indicate the current sort direction. You can reverse the direction by clicking on this icon.

4 To ungroup the rows, drag the headers back to the spreadsheet header bar, or simply click the Allow Grouping button a second time.