Scalable Database Server, HiRDB Version 8 SQL Reference
The window function determines a result from a window frame that specifies a window associated with the window function. The function of the window function is described below.
In the window frame, specify the portion of a set of rows from which data is to be collected. In a version that supports only () for the window specification, the window frame indicates the entire range of a table derived as the result of a WHERE or FROM clause.
Table 2-22 Function of the window function
| Window function type | Explanation |
|---|---|
| COUNT(*) | Sets the number of rows to be input into the window frame. |
window-function::=COUNT(*)
OVER window-specification
window-specification::=()
|
The following rules apply to the window function:
A usage example of the window function is described below. The table used in this example has the following structure:
SELECT "ID", "POINTS", COUNT(*) OVER() AS "TOTAL"
FROM "SCORES" ORDER BY "POINTS" DESC
All Rights Reserved. Copyright (C) 2007, Hitachi, Ltd.