Window functions are distingished from ordinary SQL functions by the +

Window functions are distinguished from ordinary SQL functions by the presence of an OVER clause. If a function invocation has an OVER clause then it is a window function, and if lacks a OVER clause it is an ordinary function. Window functions might also have a FILTER clause in between the function and the OVER clause. @@ -48,19 +48,19 @@

The example uses the built-in window function row_number().
The row_number() window function
assigns a monotonically increasing integer to each
-row in order of the the "ORDER BY" clause within the
+row in order of the "ORDER BY" clause within the

Named **win1**, rank() OVER **win2**
@@ -440,11 +440,11 @@
cume_dist() OVER win AS cume_dist
FROM t2
WINDOW win AS (ORDER BY a);

The example below uses ntile() to divde the six rows into two groups (the +

The example below uses ntile() to divide the six rows into two groups (the
ntile(2) call) and into four groups (the ntile(4) call). For ntile(2), there
are three rows assigned to each group. For ntile(4), there are two groups of
two and two groups of one. The larger groups of two appear first.