|
Window functions pages in https://mariadb.com/kb/en/library/window-functions/ do not mention the following functions:
LAG()
LEAD()
NTH_VALUE()
LAST_VALUE()
All of them are working in 10.2.10
{{CREATE TABLE t (x INT);
INSERT INTO t VALUES(1),(3),(2);
SELECT x, LAG OVER() lag, LEAD OVER() lead, NTH_VALUE(x, 1) OVER() first, LAST_VALUE OVER() last FROM t;
-----------------------
-----------------------
| 1 |
NULL |
2 |
1 |
3 |
| 3 |
2 |
NULL |
1 |
3 |
| 2 |
1 |
3 |
1 |
3 |
-----------------------
3 rows in set (0.00 sec)
SELECT @@version;
---------------------
---------------------
---------------------
1 row in set (0.00 sec)}}
|