## 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
PRAGMA vdbe_trace = ON;
-- -quote

CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',1.5), ('a','c',-2.25), ('b','b',4.75);
SELECT a,
SUM(CASE WHEN b='b' THEN c ELSE 0 END) AS d,
SUM(CASE WHEN b='c' THEN c ELSE 0 END) AS e
FROM T
GROUP BY a;
PRAGMA fullsync = FALSE;
PRAGMA journal_mode = 'OFF';
CREATE TABLE T1 (
  A VARCHAR(15) PRIMARY KEY,
  B VARCHAR(30) NOT NULL UNIQUE
);
CREATE TABLE T2 (
  A VARCHAR(10) PRIMARY KEY,
  X VARCHAR(15) NOT NULL,
  C BIGINT,
  FOREIGN KEY (X) REFERENCES T1(A)
);
INSERT INTO T1 VALUES ('p', 'x');
INSERT INTO T1 VALUES ('q', 'y');
INSERT INTO T2 VALUES ('a', 'p', 9223372036854775807);
INSERT INTO T2 VALUES ('b', 'q', -9223372036854775808);
SELECT X, SUM(C) AS D, COUNT(*) AS E FROM T2 GROUP BY X;
.vfsname
BEGIN IMMEDIATE;
.open employee.db
SAVEPOINT sp1206;
.check
ATTACH DATABASE '' || (':memory:') AS aux1;
SAVEPOINT sp5080;
PRAGMA read_uncommitted <= OFF;
.timeout datetime(acos(tanh(lower((123 - 0)))))
CREATE TABLE T1 (
  a INTEGER,
  b TEXT
);
CREATE TABLE T2 (
  a INTEGER,
  b TEXT
);
INSERT INTO T1 VALUES (1,'a'),(2,'b');
INSERT INTO T2 VALUES (1,'c'),(1,'d');
SELECT T1.b,
(
  SELECT GROUP_CONCAT(b,',')
  FROM T2
  WHERE NOT T2.a=T1.a
) AS c
FROM T1;
PRAGMA module_list;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (-upper('hello') + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT /**/ a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
CREATE TABLE `T` (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a Order BY c DESC) AS d FROM T;
CREATE  INDEX IF NOT EXISTS idx_T_2871 ON T((b + 1));
ALTER TABLE tkt3376 DROP COLUMN a;
ALTER TABLE tkt3376 DROP COLUMN a;
SELECT MAX(a) FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT  EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
CREATE  INDEX IF NOT EXISTS idx_T_2871 ON T((b + 1));
ALTER TABLE tkt3376 DROP COLUMN a;
ALTER TABLE tkt3376 DROP COLUMN a;
SELECT MAX(a) FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
CREATE  INDEX IF NOT EXISTS idx_T_2871 ON T((b + 1));
ALTER TABLE tkt3376 DROP COLUMN a;
ALTER TABLE tkt3376 DROP COLUMN a;
SELECT MAX(a) FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
CREATE  INDEX IF NOT EXISTS idx_T_2871 ON T((b + 1));
ALTER TABLE tkt3376 DROP COLUMN a;
ALTER TABLE tkt3376 DROP COLUMN a;
SELECT MAX(a) FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
CREATE  INDEX IF NOT EXISTS idx_T_2871 ON T((b + 1));
ALTER TABLE tkt3376 DROP COLUMN a;
ALTER TABLE tkt3376 DROP COLUMN a;
SELECT MAX(a) FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE T (
  A VARCHAR(20),
  B VARCHAR(10),
  C INTEGER,
  PRIMARY KEY (A, B)
);
INSERT INTO T VALUES ('a', 'p', -2147483648);
INSERT INTO T VALUES ('b', 'q', 100);
INSERT INTO T VALUES ('b', 'r', 200);
INSERT INTO T VALUES ('c', 's', 300);
INSERT INTO T VALUES ('d', 't', 2147483647);
INSERT INTO T VALUES ('b', 't', 50);
SELECT A, COUNT(*) AS D, SUM(C) AS E FROM T GROUP BY A HAVING COUNT(*) > 1;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
.log ON
.quit
PRAGMA encoding=UTF16le;
CREATE TABLE `tkt3376`(a COLLATE nocase PRIMARY KEY);
INSERT INTO main.tkt3376 VALUES('abc');
INSERT INTO tkt3376 VALUES('ABX');
SELECT DISTINCT a FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_6708 AS SELECT a FROM tkt3376;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_5408 ON tkt3376((a + x'ba14badb54c11059534514678aee')) WHERE a IS NOT NULL;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
DROP INDEX IF EXISTS tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_8280 AS SELECT a FROM tkt3376;
INSERT INTO tkt3376 VALUES (NULL);
SELECT * FROM tkt3376;
SELECT * FROM tkt3376 WHERE a IN (SELECT a FROM tkt3376 LIMIT (0 + 0));
UPDATE tkt3376 SET a = NULL WHERE 1;
SELECT COUNT(*) FROM tkt3376;
CREATE  VIEW IF NOT EXISTS v_tkt3376_4824 AS SELECT a FROM tkt3376;
CREATE TABLE T (
  a TEXT,
  b TEXT,
  c REAL
);
INSERT INTO T VALUES ('a','b',5.0), ('a','c',5.0), ('b','d',-8.25);
SELECT a,b,c,
RANK() OVER (PARTITION BY a ORDER BY c DESC) AS d FROM T;
CREATE  INDEX IF NOT EXISTS idx_T_2871 ON T((b + 1));
ALTER TABLE tkt3376 DROP COLUMN a;
ALTER TABLE tkt3376 DROP COLUMN a;
SELECT MAX(a) FROM tkt3376;
SELECT TOTAL(a) FROM tkt3376;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_592 AS SELECT a FROM tkt3376;
REINDEX;
ALTER TABLE tkt3376 RENAME COLUMN a TO a_r442;
SELECT * FROM tkt3376 AS a RIGHT JOIN tkt3376 AS b ON a.rowid = b.rowid;
CREATE TABLE T (
  a INTEGER,
  b TEXT,
  c REAL,
  d REAL
);
INSERT INTO T VALUES (1,'a',40.5,-70.0), (2,'b',-10.25,20.5), (3,'c',9e999,-9e999);
SELECT b FROM T WHERE ABS(c) > 5 anD ABS(d) > 5;
ALTER TABLE T RENAME COLUMN c TO c_r3437;
RELEASE sp5080;
CREATE  INDEX IF NOT EXISTS idx_T_2499 ON T(lower(a));
WITH cte AS (SELECT NULL AS x) SELECT COALESCE(x, 0) FROM cte;
INSERT INTO T1 VALUES (NULL, NULL);
SELECT b FROM T2 UNION SELECT b FROM (SELECT * FROM T2) AS sub;
INSERT INTO T2 VALUES (1, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
ANALYZE;
CREATE TEMP  VIEW IF NOT EXISTS v_tkt3376_2093 AS SELECT a FROM tkt3376;
CREATE TABLE T1 (
  a INTEGER,
  b REAL
);
CREATE TABLE T2 (
  a INTEGER,
  b REAL
);
INSERT INTO T1 VALUES (1,1.0);
INSERT INTO T2 VALUES (1,-1.0),(2,9e999);
INSERT OR REPLACE INTO T1
SELECT * FROM T2;
SELECT * FROM T1;
SELECT * FROM T1 WHERE NOT EXISTS (SELECT 1 FROM T1 WHERE 1 = 1);
DETACH DATABASE aux1;
PRAGMA legacy_alter_table = TRUE;
VACUUM main;
PRAGMA defer_foreign_keys = 0;
CREATE  VIEW IF NOT EXISTS v_T1_5152 AS SELECT b FROM T1;
INSERT OR REPLACE INTO T2 VALUES ('', NULL);
SELECT COUNT(*) FROM T1;
ROLLBACK TO sp1206;
RELEASE sp1206;
PRAGMA legacy_alter_table = ON;
SELECT MIN(a) OVER (PARTITION BY a ORDER BY a ROWS BETWEEN 2 PRECEDING AND 2 FOLLOWING EXCLUDE CURRENT ROW) FROM T2;
SELECT FIRST_VALUE(a) OVER (ORDER BY a ROWS BETWEEN CURRENT ROW AND UNBOUNDED FOLLOWING EXCLUDE GROUP) FROM T;
WITH RECURSIVE r AS (SELECT * FROM T1 LIMIT 1 UNION ALL SELECT t.* FROM T1 t JOIN r ON t.b = r.b LIMIT 10) SELECT * FROM r;
VACUUM main;
END TRANSACTION;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_1267 ON tkt3376(a COLLATE NOCASE) WHERE a IS NOT NULL;
SELECT COUNT(*) FROM T2;
VACUUM;
INSERT INTO T1 VALUES (NULL, NULL);
REINDEX T1;
ANALYZE T2;
VACUUM main;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T_9343 ON T(lower(c)) WHERE c IS NOT NULL;
ALTER TABLE T1 RENAME TO T1_r8043;
SELECT * FROM T1 AS a INNER JOIN tkt3376 AS b ON a.rowid = b.rowid;
INSERT OR IGNORE INTO T2 VALUES ('', 5);
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T2_6533 ON T2(a) WHERE +a > 0;

SELECT COUNT(*) FROM T;
INSERT INTO tkt3376 SELECT * FROM tkt3376;
CREATE UNIQUE  INDEX IF NOT EXISTS idx_T1_4643 ON T1(a COLLATE NOCASE);
INSERT INTO T1 VALUES (NULL, NULL) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b;
SELECT COUNT(*) FILTER (WHERE d IS NOT NULL), SUM(rowid) FILTER (WHERE d > 0), COUNT(*) FILTER (WHERE 1=0), COUNT(*) FILTER (WHERE 1=1), COUNT(*) FILTER (WHERE NULL), AVG(d) FILTER (WHERE d > 0 AND d < 100), COUNT(*) FILTER (WHERE typeof(d) = "text") FROM T;
ALTER TABLE T1 RENAME COLUMN b TO b_r9103;
CREATE  INDEX IF NOT EXISTS idx_tkt3376_2377 ON tkt3376(a) WHERE a IS NOT NULL;

INSERT INTO tkt3376 SELECT * FROM tkt3376;
INSERT INTO T1 DEFAULT VALUES;
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;
INSERT INTO T VALUES ('x', 'x', 1, 1) ON CONFLICT(a) DO UPDATE SET a = excluded.a, b = excluded.b, c = excluded.c;
SELECT * FROM T1;
ALTER TABLE tkt3376 DROP COLUMN a;
INSERT INTO tkt3376 VALUES (1) ON CONFLICT(a) DO UPDATE SET a = excluded.a;
ALTER TABLE T RENAME TO T_r3936;
PRAGMA vdbe_debug = 0;
CREATE  VIEW IF NOT EXISTS v_T_8335 AS SELECT c FROM T;
INSERT INTO tkt3376 VALUES (NULL);
ALTER TABLE T DROP COLUMN d;
```

## Actual output

```sql
a|1.5|-2.25
b|4.75|0
off
p|9223372036854775807|1
q|-9223372036854775808|1
```

## Expectation

```sql
a|1.5|-2.25
b|4.75|0
memory
p|9223372036854775807|1
q|-9223372036854775808|1
```

## Flag

```
-vfs memdb
```

