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

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

59 lines
1.3 KiB
Plaintext

SELECT log, count(*) FROM t1 HAVING log>=4
SELECT count(*) FROM t1 HAVING log>=4
SELECT count(*) FROM t1 HAVING log!=400
CREATE TABLE t0(c0 REAL, c1 REAL GENERATED ALWAYS AS (c0));
INSERT INTO t0(c0) VALUES (1);
SELECT * FROM t0 GROUP BY c0;
CREATE TABLE t1(a, b);
CREATE TABLE t2(c, d);
SELECT max(t1.a),
(SELECT 'xyz' FROM (SELECT * FROM t2 WHERE 0) WHERE t1.b=1)
FROM t1;
CREATE TABLE t1(a);
CREATE TABLE t2(x);
SELECT count(x), m FROM t1 LEFT JOIN (SELECT x, 59 AS m FROM t2) GROUP BY a;
INSERT INTO t1 VALUES(1), (1), (2), (3);
SELECT count(x), m FROM t1 LEFT JOIN (SELECT x, 59 AS m FROM t2) GROUP BY a;
INSERT INTO t2 VALUES(45);
SELECT count(x), m FROM t1 LEFT JOIN (SELECT x, 59 AS m FROM t2) GROUP BY a;
INSERT INTO t2 VALUES(210);
SELECT count(x), m FROM t1 LEFT JOIN (SELECT x, 59 AS m FROM t2) GROUP BY a;
INSERT INTO t2 VALUES(NULL);
SELECT count(x), m FROM t1 LEFT JOIN (SELECT x, 59 AS m FROM t2) GROUP BY a;
DELETE FROM t2;
DELETE FROM t1;
INSERT INTO t1 VALUES('value');
INSERT INTO t2 VALUES('hello');
SELECT group_concat(x), m FROM t1
LEFT JOIN (SELECT x, 59 AS m FROM t2) GROUP BY a;
SELECT group_concat(x), m, n FROM t1
LEFT JOIN (SELECT x, 59 AS m, 60 AS n FROM t2) GROUP BY a;