Neoview SQL Reference Manual (R2.5)

result table contains one group for each age and, within each age group, subgroups for each
job code.
You can specify GROUP BY using ordinals to refer to the relative position within the SELECT
list. For example, GROUP BY 3, 2, 1.
For grouping purposes, all nulls are considered equal to one another. The result table of a
GROUP BY clause can have only one null group.
See “Considerations for GROUP BY” (page 175).
HAVING search-condition
specifies a search-condition to apply to each group of the grouped table resulting from
the preceding GROUP BY clause in the SELECT statement.
To comply with ANSI standards, Neoview SQL does not move aggregate predicates from
the WHERE clause to a HAVING clause and does not move non-aggregate predicates from
the HAVING clause to the WHERE clause.
If there is no GROUP BY clause, the search-condition is applied to the entire table (which
consists of one group) resulting from the WHERE clause (or the FROM clause if there is no
WHERE clause).
In search-condition, you can specify any column as the argument of an aggregate (or
set) function; for example, AVG (SALARY). An aggregate function is applied to each group
in the grouped table.
A column that is not an argument of an aggregate function must be a grouping column.
When you refer to a grouping column, you are referring to a single value because each row
in the group contains the same value in the grouping column.
See “Search Condition” (page 305).
[FOR] access-option ACCESS
specifies the access-option when accessing data specified by the SELECT statement or
by a table reference in the FROM clause derived from the evaluation of a query expression
that is a SELECT statement. See “Data Consistency and Access Options” (page 25).
READ UNCOMMITTED
specifies that any data accessed need not be from committed rows.
READ COMMITTED
specifies that any data accessed must be from committed rows.
SERIALIZABLE | REPEATABLE READ
specifies that the SELECT statement and any concurrent process (accessing the same data)
execute as if the statement and the other process had run serially rather than concurrently.
SKIP CONFLICT
enables transactions to skip rows locked in a conflicting mode by another transaction.
You cannot use SKIP CONFLICT in a SET TRANSACTION statement.
IN {SHARE | EXCLUSIVE} MODE
specifies that SHARE or EXCLUSIVE locks be used when accessing data specified by a
SELECT statement or by a table reference in the FROM clause derived from the evaluation
of a query expression that is a SELECT statement. The specified locks are also used when
accessing the index, if any, through which the table accesses occur.
UNION [ALL] select-stmt
specifies a set union operation between the result table of a SELECT statement and the result
table of another SELECT statement.
The result of the union operation is a table that consists of rows belonging to either of the
two contributing tables. If you specify UNION ALL, the table contains all the rows retrieved
by each SELECT statement. Otherwise, duplicate rows are removed.
172 SQL Statements