PRAGMA foreign_keys = ON;

PRAGMA writable_schema = 1;
DELETE FROM sqlite_master WHERE type IN ("table", "index", "trigger");
PRAGMA writable_schema = 0;
VACUUM;

CREATE TABLE "Examination" (
"Examination Date" DATE,
"Diagnosis" TEXT,
"Thrombosis" INT
);

CREATE TABLE "Patient" (
"ID" INT UNIQUE,
"SEX" TEXT,
"First Date" DATE,
"Diagnosis" TEXT,
PRIMARY KEY ("ID")
);



INSERT INTO "Patient" VALUES ("1", "M", "1981-01-15", "BEHCET");
INSERT INTO "Patient" VALUES ("2", "M", "1981-05-20", "OTHER");
INSERT INTO "Patient" VALUES ("3", "M", "1981-11-30", "BEHCET");
INSERT INTO "Patient" VALUES ("4", "M", "1981-07-10", "OTHER");
INSERT INTO "Patient" VALUES ("5", "M", "1981-12-01", "OTHER");
INSERT INTO "Patient" VALUES ("6", "M", "1980-03-22", "BEHCET");
INSERT INTO "Patient" VALUES ("7", "F", "1981-04-18", "BEHCET");
INSERT INTO "Patient" VALUES ("8", "M", "1982-06-05", "BEHCET");
INSERT INTO "Patient" VALUES ("9", "M", "1981-09-09", "BEHCET");
INSERT INTO "Patient" VALUES ("10", "M", "1981-02-28", "OTHER");
INSERT INTO "Examination" VALUES ("1981-02-01", "BEHCET", "1");
INSERT INTO "Examination" VALUES ("1981-06-15", "OTHER", "0");
INSERT INTO "Examination" VALUES ("1981-12-05", "BEHCET", "1");
INSERT INTO "Examination" VALUES ("1981-08-20", "OTHER", "0");
INSERT INTO "Examination" VALUES ("1981-12-15", "OTHER", "0");
INSERT INTO "Examination" VALUES ("1980-04-10", "BEHCET", "1");
INSERT INTO "Examination" VALUES ("1981-05-01", "BEHCET", "1");
INSERT INTO "Examination" VALUES ("1982-07-10", "BEHCET", "1");
INSERT INTO "Examination" VALUES ("1981-10-10", "BEHCET", "1");
INSERT INTO "Examination" VALUES ("1981-03-05", "OTHER", "0");