SAND CDBMS SQL Reference Guide
SELECT

 

Previous Topic:
Joined Table Expression Clause
Chapter Index
Next Topic:
Description of SELECT Clauses

 

Group/Order Expression Clause


column name
The column name argument specifies a column in the projection list by which to group or order the results of the query.

alias
The alias argument specifies an alias given to a column or derived column in the projection list, which will be used to group or order the results of the query.

positive integer
The positive integer argument identifies a column or derived column by its position in the projection list. That is, the first item in the projection list is 1, the second is 2, and so on. The position number cannot refer to a constant, or an expression composed entirely of constants, in the projection list.

<value expression>
Grouping and ordering can be based on a value expression from the projection list by including the same expression in the GROUP BY or ORDER BY clause. The value expression in the GROUP BY or ORDER BY clause must match the one in the projection list exactly (excluding whitespace differences), otherwise an error will be returned.