Click here to view and discuss this page in DocCommentXchange. In the future, you will be sent there automatically.
The standard GROUP BY clause of a SELECT statement allows you to group rows in the result set according the grouping expressions
you supply. For example, if you specify
GROUP BY columnA, columnB, the rows are grouped by combinations of unique values from columnA and columnB. In the standard GROUP BY clause, the groups
reflect the evaluation of the combination of all specified GROUP BY expressions.
However, you may want to specify different groupings or subgroupings of the result set. For example, you may want to your results to show your data grouped by unique values of columnA and columnB, and then regrouped again by unique values of columnC. You can achieve this result using the GROUPING SETS extension to the GROUP BY clause.
Discuss this page in DocCommentXchange.
|Copyright © 2014, SAP AG or an SAP affiliate company. - SAP Sybase SQL Anywhere 16.0|