Documentation Source Text

Check-in [221cce4209]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix typos in the windowfunctions.html document.
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256:221cce4209f950a4b91372aed71f477daf883e7acfb981295d22502dbc40fc21
User & Date: drh 2018-09-12 10:49:36
Context
2018-09-13
12:50
Updates to the geopoly documentation. check-in: f1742a52f5 user: drh tags: trunk
2018-09-12
10:49
Fix typos in the windowfunctions.html document. check-in: 221cce4209 user: drh tags: trunk
2018-09-11
22:44
Fix typos in the geopoly document. check-in: 81cf14c724 user: drh tags: trunk
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Changes to pages/windowfunctions.in.

    18     18   presence of an OVER clause.  If a function invocation has an OVER clause
    19     19   then it is a window function, and if lacks a OVER clause it is an ordinary
    20     20   function.  Window functions might also have a FILTER
    21     21   clause in between the function and the OVER clause.
    22     22   
    23     23   <p>Unlike ordinary functions, window functions
    24     24   cannot use the DISTINCT keyword.
    25         -Also, Window functions may only appears in the result set and in the
           25  +Also, Window functions may only appear in the result set and in the
    26     26   ORDER BY clause of a SELECT statement.
    27     27   
    28     28   <p>The following simple table is used to demonstrate how window
    29     29   functions work:
    30     30   
    31     31   <codeblock>
    32     32     CREATE TABLE t0(x INTEGER PRIMARY KEY, y TEXT);
................................................................................
   363    363          non-negative integer. In this case the value returned is the result
   364    364          of evaluating <i>expr</i> against the row <i>offset</i> rows before the
   365    365          current row within the partition. If <i>offset</i> is 0, then
   366    366          <i>expr</i> is evaluated against the current row. If there is no row
   367    367          <i>offset</i> rows before the current row, NULL is returned.
   368    368   
   369    369         <p> If <i>default</i> is also provided, then it is returned instead of
   370         -      NULL if row identified by <i>offset</i> does not exist.
          370  +      NULL if the row identified by <i>offset</i> does not exist.
   371    371          
   372    372     <dt><p><b>lead(expr)<br>lead(expr, offset)<br>lead(expr, offset, default)</b>
   373    373     <dd><p> The first form of the lead() function returns the result of evaluating
   374    374          expression <i>expr</i> against the next row in the partition. Or, if
   375    375          there is no next row (because the current row is the last), NULL.
   376    376   
   377    377         <p> If the <i>offset</i> argument is provided, then it must be a
................................................................................
   378    378          non-negative integer. In this case the value returned is the result
   379    379          of evaluating <i>expr</i> against the row <i>offset</i> rows after the
   380    380          current row within the partition. If <i>offset</i> is 0, then
   381    381          <i>expr</i> is evaluated against the current row. If there is no row
   382    382          <i>offset</i> rows after the current row, NULL is returned.
   383    383   
   384    384         <p> If <i>default</i> is also provided, then it is returned instead of
   385         -      NULL if row identified by <i>offset</i> does not exist.
          385  +      NULL if the row identified by <i>offset</i> does not exist.
   386    386     <dt><p><b>first_value(expr)</b>
   387    387     <dd><p> This built-in window function calculates the window frame for each
   388    388          row in the same way as an aggregate window function. It returns the
   389    389          value of <i>expr</i> evaluated against the first row in the window frame
   390    390          for each row.
   391    391     <dt><p><b>last_value(expr)</b>
   392    392     <dd><p> This built-in window function calculates the window frame for each