0
0
mirror of https://github.com/tursodatabase/libsql.git synced 2024-12-15 08:39:46 +00:00
ad hoc ad79ef48a2
libsql wal tests (#1408)
* add tests

* add bench
2024-05-24 13:59:17 +00:00

22 lines
501 B
Plaintext

CREATE TABLE t1(a, b);
INSERT INTO t1 VALUES(4, 'a');
INSERT INTO t1 VALUES(6, 'b');
INSERT INTO t1 VALUES(1, 'c');
INSERT INTO t1 VALUES(5, 'd');
INSERT INTO t1 VALUES(2, 'e');
INSERT INTO t1 VALUES(3, 'f');
SELECT win(a) OVER (ORDER BY b), median(a) OVER (ORDER BY b) FROM t1;
SELECT sumint(a) OVER (ORDER BY rowid) FROM t1 ORDER BY rowid;
SELECT sumint(a) OVER (ORDER BY rowid ROWS BETWEEN 1 PRECEDING AND 1 FOLLOWING) FROM t1 ORDER BY rowid;
SELECT sum(a) FROM t1;