Window function (SQL): Difference between revisions

Content deleted Content added
Djonesuk (talk | contribs)
History: add SQLite
m Example: lang="tsql"
 
Line 63:
Ophelia|
Zach| <-- Following (unbounded)
In the above table, the next query extracts for each row the values of a window with one preceding and one following row:
<syntaxhighlight lang="psqltsql">
SELECT
LAG(name, 1)
Line 72 ⟶ 73:
FROM people
ORDER BY name
</syntaxhighlight>
The result query contains the following values:
| PREV | NAME | NEXT |
|----------|----------|----------|