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 "visit" (
"Museum_ID" INT,
"visitor_ID" TEXT,
"Num_of_Ticket" INT,
"Total_spent" FLOAT,
PRIMARY KEY ("Museum_ID", "visitor_ID")
);

CREATE TABLE "visitor" (
"ID" INT,
"Name" TEXT,
"Level_of_membership" INT,
"Age" INT,
PRIMARY KEY ("ID")
);





INSERT INTO "visitor" VALUES ("1", "Alice Smith", "3", "25");
INSERT INTO "visitor" VALUES ("2", "Bob Johnson", "5", "40");
INSERT INTO "visitor" VALUES ("3", "Charlie Brown", "2", "30");
INSERT INTO "visitor" VALUES ("4", "Diana Prince", "4", "35");
INSERT INTO "visitor" VALUES ("5", "Eve Adams", "1", "22");
INSERT INTO "visitor" VALUES ("6", "Frank White", "6", "50");
INSERT INTO "visitor" VALUES ("7", "Grace Lee", "4", "28");
INSERT INTO "visitor" VALUES ("8", "Henry King", "3", "45");
INSERT INTO "visitor" VALUES ("9", "Ivy Green", "4", "33");
INSERT INTO "visitor" VALUES ("10", "Jack Black", "2", "19");
INSERT INTO "visitor" VALUES ("11", "Karen Hall", "4", "55");
INSERT INTO "visitor" VALUES ("12", "Liam Scott", "1", "27");
INSERT INTO "visitor" VALUES ("13", "Mia Taylor", "4", "31");
INSERT INTO "visitor" VALUES ("14", "Noah Clark", "3", "38");
INSERT INTO "visitor" VALUES ("15", "Olivia Lewis", "4", "42");
INSERT INTO "visitor" VALUES ("16", "Peter Young", "5", "60");
INSERT INTO "visitor" VALUES ("17", "Quinn Hill", "2", "24");
INSERT INTO "visitor" VALUES ("18", "Rachel Bell", "4", "29");
INSERT INTO "visitor" VALUES ("19", "Sam Baker", "1", "20");
INSERT INTO "visitor" VALUES ("20", "Tina Wright", "4", "36");
INSERT INTO "visitor" VALUES ("21", "Ursula Davis", "3", "48");
INSERT INTO "visitor" VALUES ("22", "Victor Miller", "4", "52");
INSERT INTO "visitor" VALUES ("23", "Wendy Moore", "2", "26");
INSERT INTO "visitor" VALUES ("24", "Xavier Hall", "4", "39");
INSERT INTO "visitor" VALUES ("25", "Yara King", "1", "23");
INSERT INTO "visitor" VALUES ("26", "Zoe Green", "4", "34");
INSERT INTO "visit" VALUES ("101", "1", "2", "30.00");
INSERT INTO "visit" VALUES ("102", "2", "1", "15.00");
INSERT INTO "visit" VALUES ("103", "3", "3", "45.00");
INSERT INTO "visit" VALUES ("104", "4", "2", "30.00");
INSERT INTO "visit" VALUES ("105", "5", "1", "15.00");
INSERT INTO "visit" VALUES ("101", "7", "2", "30.00");
INSERT INTO "visit" VALUES ("102", "8", "1", "15.00");
INSERT INTO "visit" VALUES ("103", "9", "3", "45.00");
INSERT INTO "visit" VALUES ("104", "10", "2", "30.00");
INSERT INTO "visit" VALUES ("105", "11", "1", "15.00");
INSERT INTO "visit" VALUES ("101", "13", "2", "30.00");
INSERT INTO "visit" VALUES ("102", "14", "1", "15.00");
INSERT INTO "visit" VALUES ("103", "15", "3", "45.00");
INSERT INTO "visit" VALUES ("104", "17", "2", "30.00");
INSERT INTO "visit" VALUES ("105", "18", "1", "15.00");
INSERT INTO "visit" VALUES ("101", "20", "2", "30.00");
INSERT INTO "visit" VALUES ("102", "21", "1", "15.00");
INSERT INTO "visit" VALUES ("103", "22", "3", "45.00");
INSERT INTO "visit" VALUES ("104", "23", "2", "30.00");
INSERT INTO "visit" VALUES ("105", "24", "1", "15.00");
INSERT INTO "visit" VALUES ("101", "26", "2", "30.00");