## Summary
<!--Explain briefly what goes wrong and explain why you believe this is a bug and not the intended behavior of SQLite (if it is not a crash).-->**No review yet**

## Minimized query

```sql
.open random-json.db
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only IS NOT acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;

SELECT * FROM T WHERE a NOT IN (SELECT a FROM T WHERE a IS NOT NULL);
.open random-json.db
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only IS NOT acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;

SELECT * FROM T WHERE a NOT IN (SELECT a FROM T WHERE a IS NOT NULL);
.open random-json.db
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only IS NOT acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;

SELECT * FROM T WHERE a NOT IN (SELECT a FROM T WHERE a IS NOT NULL);
.open random-json.db
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only IS NOT acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;

SELECT * FROM T WHERE a NOT IN (SELECT a FROM T WHERE a IS NOT NULL);
.open random-json.db
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only IS NOT acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;

SELECT * FROM T WHERE a NOT IN (SELECT a FROM T WHERE a IS NOT NULL);
.open random-json.db
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only IS NOT acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;

SELECT * FROM T WHERE a NOT IN (SELECT a FROM T WHERE a IS NOT NULL);
.open random-json.db
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only IS NOT acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;

SELECT * FROM T WHERE a NOT IN (SELECT a FROM T WHERE a IS NOT NULL);
.open random-json.db
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only IS NOT acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;

SELECT * FROM T WHERE a NOT IN (SELECT a FROM T WHERE a IS NOT NULL);
.open random-json.db
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only IS NOT acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;
ATTACH DATABASE ':memory:' AS aux72;
SAVEPOINT sp4092;
.cd
SAVEPOINT sp5428;
ATTACH DATABASE ':memory:' AS aux37;
PRAGMA query_only = acos(jsonb_group_object('k', json_extract(((0 * 1) + 0), '$.key', '$[0]')));
SAVEPOINT sp7195;
PRAGMA foreign_keys = YES;
PRAGMA temp_store = '0';
.import random-json.db main
ATTACH DATABASE ':memory:' AS aux30;
SAVEPOINT sp5354;
PRAGMA writable_schema < YES;
CREATE TABLE "T" (
  a CHARACTER(char(-glob('?', 'hello') ->> '$[0]')),
  b DECIMAL(10,5)
);
INSERT INTO main.T VALUES ('a','2020-01-01'), ('b','2026-01-01');
WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (WITH _m AS MATERIALIZED (SELECT * FROM T) SELEC_m * FROM T) SELEC_m * FROM T) SELEC_m a,
CAST(
  (julianday('now')-julianday(b))/365.25
  AS INTEGER
) AS c
FROM T;
INSERT INTO T VALUES (NULL, NULL);
SELECT TOTAL(a) FROM T;
CREATE TRIGGER IF NOT EXISTS /**/ trg_T_8644 AFTER UPDATE OF a ON T BEGIN SELECT RAISE(IGNORE); END;
ROLLBACK TO sp5354;
RELEASE sp5354;
DETACH DATABASE aux30;
SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_2805 AFTER DELETE ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T ADD COLUMN extra_9108 INTEGER;
DELETE FROM T WHERE NOT NOT (0) RETURNING *;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_9583 AS SELECT a FROM T;
INSERT OR REPLACE INTO T VALUES (NULL, 'x');
INSERT INTO T VALUES (NULL, NULL);

SELECT COUNT(*) FROM T;
CREATE TRIGGER IF NOT EXISTS trg_T_4868 AFTER INSERT ON T BEGIN SELECT RAISE(ROLLBACK, 'rb'); END;
ALTER TABLE T RENAME TO T_r5788;
RELEASE sp7195;
SELECT COUNT(*) FILTER (WHERE b IS NOT NULL), SUM(rowid) FILTER (WHERE b > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(b) FILTER (WHERE b > 0 AND b < 100), COUNT(*) FILTER (WHERE typeof(b) = "text") FROM T;
SELECT COUNT(*) FILTER (WHERE a IS NOT NULL), SUM(rowid) FILTER (WHERE a > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(a) FILTER (WHERE a > 0 AND a < 100), COUNT(*) FILTER (WHERE typeof(a) = "text") FROM T;
CREATE TEMPORARY  VIEW IF NOT EXISTS v_T_93 AS SELECT a FROM T;
SELECT TOTAL(a) FROM T;
INSERT OR IGNORE INTO T VALUES ('x',
0);

SELECT COUNT(*) FROM T;
DETACH DATABASE aux37;
INSERT INTO T SELECT * FROM T;
INSERT INTO T VALUES (1, 'x') ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
VACUUM;
SELECT * FROM T;
SELECT * FROM T WHERE NOT EXISTS (SELECT 1 FROM T t2 WHERE t2.a = T.a);
UPDATE T SET b = CURRENT_TIMESTAMP WHERE b BETWEEN 0 AND 100;
CREATE TRIGGER IF NOT EXISTS trg_T_5480 AFTER UPDATE ON T FOR EACH ROW BEGIN SELECT RAISE(ABORT, 'abort'); END;
ROLLBACK TRANSACTION TO SAVEPOINT sp5428;
RELEASE SAVEPOINT sp5428;
WITH cte AS (SELECT * FROM T) UPDATE T SET a = (SELECT a FROM cte LIMIT 1) WHERE 1=0;
DROP TRIGGER IF EXISTS T;
ROLLBACK TO sp4092;
RELEASE sp4092;
INSERT INTO T DEFAULT VALUES;
SELECT * FROM T;

SELECT COUNT(*) FROM T;
INSERT INTO T DEFAULT VALUES;
CREATE TEMP  VIEW IF NOT EXISTS v_T_7640 AS SELECT a FROM T;
DETACH DATABASE aux72;

SELECT * FROM T WHERE a NOT IN (SELECT a FROM T WHERE a IS NOT NULL);

```

## Actual output

```sql
Usage: /home/test/sqlite3-src/build/sqlite3 [OPTIONS] FILENAME [SQL]
FILENAME is the name of an SQLite database. A new database is created
if the file does not previously exist.
OPTIONS include:
   -append              append the database to the end of the file
   -ascii               set output mode to 'ascii'
   -bail                stop after hitting an error
   -batch               force batch I/O
   -box                 set output mode to 'box'
   -column              set output mode to 'column'
   -cmd COMMAND         run "COMMAND" before reading stdin
   -csv                 set output mode to 'csv'
   -deserialize         open the database using sqlite3_deserialize()
   -echo                print commands before execution
   -init FILENAME       read/process named file
   -[no]header          turn headers on or off
   -help                show this message
   -html                set output mode to HTML
   -interactive         force interactive I/O
   -json                set output mode to 'json'
   -line                set output mode to 'line'
   -list                set output mode to 'list'
   -lookaside SIZE N    use N entries of SZ bytes for lookaside memory
   -markdown            set output mode to 'markdown'
   -maxsize N           maximum size for a --deserialize database
   -memtrace            trace all memory allocations and deallocations
   -mmap N              default mmap size set to N
   -newline SEP         set output row separator. Default: '\n'
   -nofollow            refuse to open symbolic links to database files
   -nonce STRING        set the safe-mode escape nonce
   -nullvalue TEXT      set text string for NULL values. Default ''
   -pagecache SIZE N    use N slots of SZ bytes each for page cache memory
   -quote               set output mode to 'quote'
   -readonly            open the database read-only
   -safe                enable safe-mode
   -separator SEP       set output column separator. Default: '|'
   -stats               print memory stats before each finalize
   -table               set output mode to 'table'
   -tabs                set output mode to 'tabs'
   -version             show SQLite version
   -vfs NAME            use NAME as the default VFS
```

## Expectation

```sql

```

## Flag

```
-help
```

