Nonstop Database, HiRDB Version 9 UAP Development Guide
If a value is repeated in a specified column, all the items with that value can be grouped as a single item in the retrieval results. The GROUP BY clause performs this grouping. The AVG, SUM, MAX, MIN, and COUNT set functions, respectively, can be used to obtain the average value, total value, maximum value, minimum value, and rows count of each group.
The following figure shows, as an example of data grouping, the procedure for grouping sets of product codes in the ORDER1 table and then extracting the total quantity ordered for each group.
Figure 2-35 Data grouping example
All Rights Reserved. Copyright (C) 2011, Hitachi, Ltd.