mirror of
https://github.com/tursodatabase/libsql.git
synced 2024-12-12 15:33:44 +00:00
ad79ef48a2
* add tests * add bench
26 lines
587 B
Plaintext
26 lines
587 B
Plaintext
|
|
CREATE TABLE t1(a INTEGER PRIMARY KEY, b TEXT COLLATE custom);
|
|
INSERT INTO t1 VALUES(1, 'one');
|
|
INSERT INTO t1 VALUES(2, 'two');
|
|
INSERT INTO t1 VALUES(3, 'three');
|
|
INSERT INTO t1 VALUES(4, 'four');
|
|
INSERT INTO t1 VALUES(5, 'five');
|
|
INSERT INTO t1 VALUES(6, 'six');
|
|
CREATE INDEX t1b ON t1(b);
|
|
|
|
|
|
SELECT * FROM t1
|
|
|
|
|
|
SELECT group_concat(a,',') OVER win FROM t1
|
|
WINDOW win AS (
|
|
ORDER BY b RANGE BETWEEN 1 PRECEDING AND 2 PRECEDING
|
|
)
|
|
|
|
|
|
SELECT group_concat(a,',') OVER win FROM t1
|
|
WINDOW win AS (
|
|
ORDER BY b RANGE BETWEEN 1 PRECEDING AND 2 PRECEDING
|
|
)
|
|
|